How to notify app that user has changed in facebook app/ Safari IOS - iphone

Using Facebook SDK 3.5.1 in my app, my requirement is that i have logged in the app via facebook with one user (say user A) and now if i login with other user (say user B) in mobile safari/facebook app (which one is available), in this case can my app get notified that another user logged in other than one who was logged in app.
Any references or ideas?
Thanks in advance
Note : I know that this Question was asked before but no answer is there :(

I don't think there is an option for this in the Facebook API. At least I couldn't find it.
Facebook SDK for iOS
What you can do, however, is simply check every minute or so who is available.
You can save this data in an array and then compare it a minute later with the new data.
Here is how you can fetch a list of your connected friends:
iOS Facebook SDK - get list of Friends connected with App

Related

How can I determine if an app was installed from a Facebook Ad?

We have a multiplatform service and we give our users a 30 day trial. A user can sign up on iOS, use the web version and finally do the payment on Android... even if it's weird, its a possible. The database is shared between all platforms
We are using Facebook Ads to generate App installs but we don't know how to do the conversions' attribution properly. The main problem is that if, for example, a user install the app from a Facebook app but he end up paying from the web version we lost track that the origin of this user was the ad.
I would like to know if it's possible to determine using the Facebook SDK, on the first run of the app, if the user comes from a Facebook Ad and in that case I would store that information in our database to do the attribution once the purshase is done. Any ideas?
Many thanks in advance!
Regards!

Launch Facebook messenger Share extension from my iOS app

I'm developing an iPhone app and I want to launch Facebook messenger share extension from when user wants to send a photo to one of his friends.
How can this be done?
I was able to use FBdialog, but this takes the user our of the app and I don't like this option.
Thanks.
Your application must have received permissions by the user via the access token (publish_actions). Otherwise, you'll get into the fast-app-switch, which displays a separate page.
Once a user gives your app appropriate permissions, then your FB action can be seamless, without switching across.
In a nutshell, you should implement a "login" method that users "login" to your application using Facebook (more specifically - gives your app permissions to access certain parts of their FB profile), and then you should be able to use native SDK capabilities.
If you use UIActivityViewController as long as the shared objects (NSString, UIImage, etc) are compatible it should show up automatically on the share list sheet in iOS 8.
The user may have to enable it by pressing "More"

Facebook Login in two different apps of one iPhone

I developed two apps with facebook integration in both the Apps , my requirement is if i opend one app and login to facebook account , and if i open second app it should login at the same time .
Thanks
nikhil.
This isn't really possible, since both apps would then have to use the same Facebook App ID.
And since the Facebook App ID is should be part of the App URL scheme, iOS can't see the difference between the two apps and will open the one installed last.
You can try an store the Facebook login data in the keychain and use that in the other app, but not sure if that will work.

Tracking Facebook Apprequests on iphone

I have Facebook connect set up for my iphone app and am able to successfully send apprequests. What I want to do is track whenever an apprequest recipient clicks the notification to either install my app or open my app.
When the recipient already has the app installed, I can track that they opened the app from Facebook by looking at the URL in the 'application openURL' method in AppDelegate. But if the recipient does not have my app installed, clicking the notification brings them to the app store to install my app. Is there anyway for me to track that this install came from a FB apprequest? Or assuming they do NOT install my app, is there a way for me to track that?
Thank you very much for any help.
As of 5/22/2012, there is no way to accurately track installs coming from Facebook, because iTunes will truncate the URL. This was confirmed for me by a FB employee.
A rough workaround is to save all the fbuids that are sent requests for the past X hours or so. If anyone using your app FB connects within that time frame with a matching fbuid, you just assume the install came from the original FB request.

First time authorization fails with FBConnect via mobile app

After downloading my app from app store (or via OTA) and trying to share via FBConnect SDK, the mobile app is launched but returns almost immediately to the app with error -999, without asking user for authorizations.
After that, clicking on FB share button reopens the mobile app and all goes well, authorizations are asked, my app is called back and display the FB dialog.
That issue only happens once : if I uninstall/reinstall the app and remove the FBapp authorizations from my FB account, all goes well.
I already specified the BundleID/iTunes App ID in the "Native iOS App" menu, and use the last FacebookConnect SDK.
Anyone experienced the same issue ?