Why does the iOS Facebook app show the old login flow, while Safari shows the new one? - facebook-login

We are updating an app to use the new Facebook iOS SDK (4.0.1) , to support the login changes that are forced from 1st May 2015.
We invoke the login screen with login behaviour set to FBSDKLoginBehaviorNative, using this:
[self.loginManager logInWithReadPermissions:#[#"email"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
completion(nil, error);
}
else if (result.isCancelled) {
completion(nil, nil);
}
else {
completion(result.token.tokenString, nil);
}
}];
We get a strange result though. With the Facebook iOS app installed on the device and logged in as one of our Facebook App test users we see the old login screen (no ability to refuse specific permissions, and asking for the friend_list deprecated permission):
Without the Facebook iOS app installed, we get the expected new login screen:
What gives?
Device details: iPhone 4S, iOS 8.1, FB app v28.0 (13 Apr 2015).

We have verified that this is an unintended regression introduced in version 4.0 of the Facebook SDK for iOS, and we have a fix that will ship in the next update to the SDK. Once it is fixed, users will see the same version of the Login dialog regardless of whether they are viewing it in Safari or within the Facebook app.
Note that, once an application has been migrated to use version 2.0 of Graph API (post-April 30), users should see the new version of the Login dialog in both cases, with or without the fix to the SDK, so this discrepancy should only be an issue for a short time. (If you continue to see unusual behavior in this case, please report it.)
Sorry for the confusion!

Related

Facebook Share Dialog isn't working from mobile

I'm using the Facebook Share Dialog by using URL Redirection, followed this documentation:
https://developers.facebook.com/docs/sharing/reference/share-dialog/#:~:text=for%20Webmasters.-,Share%20by%20Using%20URL%20Redirection,-To%20share%20a
When submitting a private message via mobile, the next error arises: "Attachment Not Found: The attachment could not be found". It only happens in mobile. When I try it from desktop everything works fine.
I tried contact Facebook support but their support channel in no longer available for this feature.
Any idea?
Thanks!

Android LikeView error

I'm using facebook android sdk v3.19.1 in my android app. I try to use LikeView, but it's only working with users who added to the facebook app settings in the roles section as developer or tester. If I try to click the like button with a normal facebook user or a test user it's appears and disappears quickly and gives back the following error message:
error_description: The like dialog is only available to developers and testers.
error: server_error
error_reason: dialog_disabled
My app is pubilc and I turned on the Single Sign On and Deep Linking options.
I'm using facebook LoginButton and ask for "publish_actions" permission before the user click's the like button, but it's still gives me the error message.
My problem is that I can't make the like button working with test users. I submitted the like button for review to the facebook, but they gives me the following response: Please confirm your app is working correctly and that you can publish likes with a test user.
Please somebody help me to solve this. Thanks.
I have the same problem. I found this on the Facebook docs.
Test users cannot become a fan of a public Facebook Page or create
content on them, such as writing on a Page's wall. A Test user can
however view and interact with any app tab on the Page associated with
the app that created them.
(https://developers.facebook.com/docs/apps/test-users?locale=es_ES)
Are you using the FB test user account for your app? Test accounts are not allowed to Like a page. I had the same problem. I changed to using my actual FB account and the LikeButton worked perfectly fine!

Bugs:Safari cannot open the page because the address is invalid

There is an application that we used for testing our IOS app with Facebook integration. It works fine.
We've created a new Facebook application to use as a production one but faced problems in IOS app.
After user have entered login/password, gives the app permissions and press okey - safari show the following error: Safari cannot open the page because the address is invalid
Before run the app please make sure in the plist.
you are enter correct
1.FacebookAppId
2.URLSchemas

Embedding Facebook Social Like Plugin in Windows 8 Metro app page

Has anyone succeeded embedding Facebook Like button in metro app page? I tried both flavors HTML5 and iframe and none of them seem to be working fully.
What works:
Both flavors can render the not-logged-in version of Like button with total like count correctly.
What does not work:
Clicking on “Like” button takes user to metro IE for sign-in but its unable to return to the metro app page. User stays in metro IE blank page and even if you forcefully come back to metro app and restart, it still does not recognize that you are logged in to facebook.
Has anyone successfully able to add fully functional like button in metro app? Any pointers on what else to try?
No you can't. You can't integrate js from the outside like you would do on a normal webpage.
Instead you can login to Facebook from a Windows 8 application using OAuth. Once you have a valid access token you can perform any action using Facebook's Graph API, but liking a page is not supported (though the documentation is misleading).
Take a look at the Web Authentication sample SDK app.

Facebook Graph API; different behavior on simulator and device

I developed a game for iPad using SDK 4.2. I am using latest Facebook Graph API to publish score on Facebook wall but have disabled opening Safari for authentication by changing in method:
- (void)authorizeWithFBAppAuth:(BOOL)tryFBAppAuth
safariAuth:(BOOL)trySafariAuth {
trySafariAuth = YES; //changed to
trySafariAuth = NO;
}
It works well on Simulator by opening login dialog inside the app but on device (iPad) it opens Safari and the application goes in the background. While tracing through debugger, I found that:
didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
in the same method is 'YES' when run on device and 'NO' when run on simulator. This difference is causing difference in behavior. How can it be resolved? I need to use in-app authorization.
Never mind. Here is the solution.