Facebook App Requests aren't shown on iOS devices? - ios

I've sent an app invitation from an iPad app to a test Facebook account via Facebook's API. When I login to the test account on my PC, the app request is there.
When I login to the test account on my iPad (either via Safari or via the Facebook App), I can see the number "1" next to the App Centre tab, but when I click it and go to the App Centre, there's no request. In fact, I can't see any App Centre areas dedicated to requests on Facebook for iOS - there's only Social Picks and Top Apps. Any explanation for this?

This is caused by an incorrect configuration on the Facebook app setting page. When you are setting up the app, you need to make sure the following is set correctly.
Go to developers.facebook.com then select "Apps". Edit your app and fill in the following..
iOS App Bundle (dont think it's essential but fill it in, this the bundle id from Xcode (com.companyname.appname))
iPhone/iPad App Store ID - This is ESSENTIAL, one of these must be filled in with a valid app store ID. You get this when you create an app with iTunes Connect. If you create an app, and fill in the details right up to the point where it asks you to submit the binary, it will generate what Apple refers to as an Apple ID (or iTunes Id?). It's just a long integer value. It doesn't have to be for the corresponding app, if you already have apps in the app store just log in to iTunes connect and use an existing one for testing.
Configured for iOS SSO - Enabled
Configured for Deep Linking - Enabled
The only functionality you get from Facebook when a user clicks an app notification on iOS is the user being redirected to the app, if installed, or to the App Store if not. Also if you want your app notifications to show up on desktop, you'll need a Canvas URL under the "App On Facebook" section.
In my tests I had to have a canvas URL to get iOS notifications working, but I'm not sure if this is a bug with Facebook or intended behaviour, so if it doesn't work with just iOS enabled, enable app on Facebook too and stick in a random url if you don't have one.

I just figured there can be another reason for this symptom: if your app has location restriction (only available in certain countries), the user who receives the request has to be in that country (e.g. I had to connect with mine via GeoEdge).

Related

IOS: App rejected because of App Tracking Transparency on WebView

I'm working on an app made in React Native with Expo.
It uses a web view to show the site in the app.
Everything worked well, but when I submitted my app to the App Store, it got rejected.
The mail said:
We noticed you collect data to track after the user selects "Ask App
Not to Track" on the App Tracking Transparency permission request.
Specifically, we noticed your app accesses web content you own and
collects cookies for tracking after the user asked you not to track
them.
After that, using the expo tracking transparency library, I added a permission request to track data.
If the user doesn't accept it, I disable third party cookies on the web view.
After submitting again to the App Store, I got the exact same message.
I don't know what to do, because I can't control the site, and I'm limited to the React Native web view props
Maybe, I could enable incognito mode if the user doesn't want the app to track, but I'm not sure if this will be accepted too.
i had the same issue i solved it like this:
change the privacy of the app on apple store, go to app privacy and in data types section click edit and select Identifiers (Device ID) and set this one as used for tracking purposes. and make sure that this is the only one selected as used for tracking.
also make sure that the permission is showing on real device (so test it first on TestFlight).
another thing is you need to tell them where you show this permission send them video to tell them where you show the permission.

Use Google-Signin to log into App but stay signed out on Safari

I have integrated Google-Signin into an iOS Application and it works well as far as signing in or signing up is concerned.
The only problem is that, I dont want the user to be logged into Google on iOS Safari after I have used Google-Signin.
I have verified that, before I log into my app, I am signed out of google in iOS Safari. Then I go to my app and I use Google-Signin to log into my app, once that is done I then go back to iOS Safari and refresh the google page and all of a sudden it shows me signed in with the same account that I used to log in to the app.
How do i just use Google-Signin to simply log into the app and stay logged out of iOS safari?
I've researched the topic and it seems the only way to perform logout is to use SFSafariViewController to open provider's logout page
For Google this is https://accounts.google.com/logout
This way requires some additional UX changes, because this action will open Safari window for a second and user should not be confused.
Try to use GIDSignIn it will open safariviewcontroller inside the app.
You can change which content from your Google Account syncs with the Apple apps on your device. You can also remove your Google Account from your Apple apps at any time, which stops syncing.
To change what syncs or remove your Google Account:
On your iPhone or iPad, open the Settings app.
Select Mail, Contacts, Calendars or Safari
Choose the account you'd like to edit or remove.
Make the changes you want.
To change what content syncs: Next to the content you want to sync, turn on the switch. Turn it off for content you don't want to sync.
To remove your account: Select Delete Account.

How to handle URLs from Facebook Open Graph actions in iOS app

I'm building an iOS app that has Facebook open graph actions, and when I post an action on Facebook, on mobile app, I'm getting a link to my mobile app's ID on the App Store, which is not available yet. As a placeholder (otherwise Facebook doesn't save my settings), I've put an ID of another app that I have. Whenever I tap an Open Graph story on Facebook from my new app in Facebook iOS app, An App Store page of my previous app opens. I need the functionality to handle open graph action taps from Facebook iOS app before I submit my app to App Store. How can I test URL handling functionality in a such scenario?
Here is how my Facebook Native iOS App dashboard looks like:
Bundle ID matches my app's ID in my app exactly. iPhone/iPad App Store ID links to one of my previous apps, else Facebook doesn't accept my settings when I click Save button, complaining about app not yet being available on App Store. Facebook login and deep linking are both enabled, and URL schemes are registered the same way (the one starting with fb continues with my Facebook app ID) in the app bundle too. But still, my app doesn't launch when I tap a story on Facebook mobile app. Instead, a popup to install the app with the ID that I've specified launches (though, weird enough, I have that app installed too).
Facebook documents this here: https://developers.facebook.com/docs/ios/link-to-your-native-app-ios-sdk/
Just look under How to handle deep links to provide a more relevant user experience

iOS not receiving user to user app requests

I am sending app requests from an iOS native app using Facebook SDK dialog. I have created a canvas app and set the iTunes ID (using a valid ID from a different app in the store now, since mine is not). The requests arrive at desktop www site, and show up under "App and Games>Invites from friends". But, they do not show up on iOS native Facebook app, unless I first do Facebook SSO with my app. Then, my app bookmark appears in FB, and new requests increment the counter.
How do I get the requests to show up on iOS before my app is installed? Other peculiar thing that may be related, is I get no activity under "Notifications" on iOS, only the app bookmark. On desktop, I see the Notifications globe flash with a red badge at first logon, but then the badge goes away and nothing is there, although the requests appear under "Apps and games". This seems not totally consistent as some people who have tested my app get the expected Notification behavior, but I never do on my own FB account. Could it be because if added and removed the app repeatedly for testing?
Any clues?
My problem seems to have been something fouled up in the Facebook database, probably as a result of my various misfires in early development. At some point it began working correctly without any changes on my end.

How to prevent auto-launching of our iOS app from links in FB iOS app?

We have an iOS app that publishes certain activity to Facebook that contains links to pages on our domain. Our intention is for friends to click on those links and view them as webpages.
However, when you click on links in these published stories in the FB iOS app, it's auto launching our app instead of going to an embedded Web View or kicking out to safari.
Note: We still want to have single sign on (SSO), so just want to change the behavior of clicking links in published stories.
To clarify, this is what I'm talking about:
My app is able to publishes http://foo.com/123 into the FB newsfeed for a particular user that opts in.
That person's friends see the link, but when they click it, it just goes to http://foo.com/123 in the browser instead of launching my FOO app. This is because my app doesn't yet handle incoming context from FB iOS app.
I still want FB SSO to work from my FOO app. That is, when clicking on FB sign in in my FOO app, it jumps out to the FB iOS app (if installed) and does a single sign on and redirects back to my app. IOW, I don't want to break this authentication scenario that currently works.
What setting in the FB developers App Settings controls this? It's not clear from the documentation. I see sections for Native iOS app and Website which I currently have set but it's unclear which sub-setting affects the behavior in question. Also, it's not clear even if I was to find the setting, can I affect it without affecting SSO.
The setting you want in the Facebook App dialog is under the iOS Native section (see the screenshot below) - set both the highlighted sections to Disabled.
This won't affect Facebook login/SSO in the app, so you'll still be able to do the OAuth dances.

Resources