FBLoginButton not requesting permissions - ios

Firstly, apologies for the vague question!
At short notice I've been handed an app which has started failing when posting Facebook status updates. It seems to be using a very old version of the Facebook SDK so none of the code examples I have found work.
The error message when trying to post implies that facebook.users.setStatus endpoint is deprecated.
Accordingly, I updated the code to call facebook.stream.publish which seems to be the currently supported.
This results in a permissions error (code 200).
I then changed the Facebook app record to request the publish_actions permission. This looks good on the Facebook preview page:
...but doesn't seem to be reflected onthe in-app Facebook logon screen:
http://s13.postimage.org/d5sf8j0zr/i_Phone_No_Permissions_Request_Redact.png
I have waited several hours now so I don't think the problem is Facebook propogating the
app settings. Can anyone tell me if I'm on the right track here?
Plan B would be rewrite Facebook access using latest Facebook SDK, but this will require an upgrade for XCode and Mac OS, which I'm keen to avoid.

The publish_actions permission is used when dealing with Open Graph actions. From what I've read you'll need the extended publish_stream permission.

Related

iOS/objective-c: Facebook integration importing contacts no longer possible?

I am following a tutorial for integrating Facebook in an app. However, it seems that when Facebook upgraded to V2.0 of their graph, they stopped allowing imports of contacts unless the contact has the App installed.
Does anyone know if there is any workaround to this? The options available as described in these answers a year ago all seemed essentially inadequate for a commercial app. But wondering if there have been any changes in the status quo so that you can import Facebook contacts.
(Facebook remains super aggressive itself about getting contacts from iPhone, google, etc.)
Many thanks for any suggestions.
You can follow the Facebook SDK Graph API for getting contacts .
Graph API Friends List
Unfortunately, nothing has changed: you still can get only the contacts that are using your app AND that gave to your app the user_friends permission.
Please see this other question with more details.

Parse Facebook Login App Must Ask For Basic Read Permission

I am building a Parse driven iOS application and am having some strange issues with Facebook login. Upon initializing my facebook permissions, I am asking for #"email" and nothing else. The login works when the user does not have the facebook iOS application installed on their device - and authenticates through safari (or another web browser). When the user DOES have the facebook iOS application installed and tries to grant permission to my app, the following error is displayed:
I have read through multiple tutorials and related stack overflow issues, and have yet to figure this one out. I tested this out with both an older version of the facebook SDK and the brand new one (3.5). Neither of those solutions appears to work. Anyone have any ideas? Thank you kindly.
Try with both #"email" and #"basic_info". This is currently documented on the Android side, but not iOS, which is weird - https://developers.facebook.com/docs/howtos/androidsdk/3.0/native-login/

Facebook auth.extendssoaccesstoken error code 10

In our Facebook app developer insights, we're seeing consistent daily errors for method auth.extendssoaccesstoken with error code 10, 'Application does not have permission for this action'. We are on the latest SDK with a near exact implementation of the current iOS integration guide. Searching Google, SO and Facebook Developers for the error and/or anything to do with extend token provided no results. Is there something I should be enabling on the Facebook app?
After further investigation into the Facebook SDK source, I believe I have a solid lead.
Some, not all, of our users are getting the this error
The previous behavior of auth.extendSSOAccessToken was depended upon the app receiving the 'offline_access' permission from the user.
The facebook-ios-sdk does not touch the 'offline_access' permission anywhere in it's code.
The application "not having permissions" for extending the access token suggests that the method still depends on the application getting the 'offline_access' permission. The only change is this now happens silently.
The Conclusion:
The app is not being granted the 'offline_access' permission in one of the many different methods of authentication. The iOS SDK attempts authentication in the following manner:
iOS Integrated Facebook Dialog
iOS Facebook App "Fast App Switch"
Login through Safari
Facebook SDK UIView Login Dialog
4 seems outdated and unlikely, and we're getting ~17% error rates which narrows it down to 1 or 3, since 2 is definitely still widely used.
Will update after further analysis.
Update 1
Using Facebook's insights and our git history, I believe the issue occurs when the user authenticates using the iOS6 Integrated Facebook Dialog (method 1). Came to the conclusion because the error appeared on Facebook Developer Insights after the iOS6 release and we released a version of the app that used SDK 3.1
Will update after testing

The app must ask for a basic read permission at install time. Only on native?

I've been using the Facebook iOS SDK for some app I've been working on -
My app only requires publishing of a photo, and I have no use of any read permissions or basic info.
When logging in using a browser (Simulator) or Fast-App switching (Device) it works fine with just openActiveSessionWithPublishPermissions:#[#"publish_stream"]...
But if I would try the same with an iOS6 device with the Native login, it would show the error describe in the title. Even though I have no need for any read access. This problem only occurs in the native login, and not in the Browser-based or Fast-App switching based logins for some reason.
Any ideas?
I reckon it has something to do with this:
Asking for Read & Write Permissions Separately
You are now required to request read and publish permission separately (and in that order). Most likely, you will request the read permissions for personalization when the app starts and the user first logs in. Later, if appropriate, your app can request publish permissions when it intends to post data to Facebook.
You cannot request read and publish permissions simultaneously using iOS6's Facebook support, and if you attempt to, the SDK will take the user through a less-optimal app-switching or web-based authentication flow.
It seems that they added this in SDK 3.1.

Facebook connect publish_stream no longer being recognized when authorizing app (iOS)

I have an iOS app that needs to publish to a users facebook wall. Up until today (February 1st) everything was working ok. Now when a user goes to authorize the app, it only asks for basic permissions and not for the ability to publish to the users wall. I am sending a publish_stream parameter but it seems like it is getting "lost" somewhere. Any ideas?
You have to use the Single Sign On (SSO) and the Graph API to Publish in the user's wall.
It's a change in Facebook security policy and now using the publish_stream won't work anymore.
I suggest you to follow the steps of the new tutorial: https://developers.facebook.com/docs/mobile/ios/build/
This previous answer to StackOverflow explains the problem of the deprecation of publish_stream

Resources