Is it possible for an iOS app to tell if the user has set it to only me, public or friends only?
For example, the basic setting was set to public.
The iOS app would now bring up a post to wall dialog, letting the user add their own text, but on the computer, the user has changed the privacy setting of the app to Me Only or Friends.
Can the App test for the current privacy setting before the post is made?
It is possible to check the setting in which a user has shared the post using the Facebook Graph API. But you will need READ STREAM permission from the Facebook API. Here is the reference to the Graph API.
Basically you have to have READ STREAM permission.
You have to share to Facebook and the success callback will give you a post id.
You can use this post id to get all the details related to this post, including the audience (Only Me/Friends/Public).
Related
In a small test project I implemented a Facebook login feature using both iOS' built in Accounts framework and Facebook's official FBSDKLoginKit.
I noticed however that when a user logs in using the native permissions dialog, I get access to more data compared to Facebook's login SDK. I'm able to access birthday and current city:
It's odd, Facebook's documentation states your app should go trough Facebook's Login Review if your app requests access to a user's exact birthday.
Should I be in any way worried to access that information using Apple's Accounts framework? (as it is clearly bypassing something Facebook put in place to protect users). Should this be reported to Apple?
Permission work without review for everyone with a role in the App, else you would not be able to test your App before sending it in for review. More information: https://developers.facebook.com/docs/facebook-login/review
I have an app that is using publish_actions in order to post images from within the game to our app's facebook page.
I am using the iOS social framework (SLRequest and SLServiceTypeFacebook) to get permissions and to actually post the image.
All this works and is verified when I use a test facebook account.
However, I am trying to submit this for review to facebook so I can enable it for the rest of my users. but I am unable to submit because it thinks I am not making the actual API call.
It looks like you haven't made any API requests to publish content
with the publish_actions permission in the last 30 days. You need to
test this permission in your app with any account listed in Roles
before you can submit for review. It looks like you haven't tested
this permission because no API request has been made against
publish_actions in the last 30 days.
http://cl.ly/image/3g3Q1p13113F
I have tested and confirmed that I can successfully use the publish_actions API to post from the app to the app's facebook page. How can I get facebook to allow me to actually submit this permission for review?
Are you making a direct API call to any of the APIs that need publish_actions permission? There are some instances where you do not need this permission, namely, if you are using a share dialog. An example of an API that needs publish_actions permission is a POST request to /{user-id}/feed. Also if you are making a post as a page, you might need publish_pages permission instead. e.g. Making a call to {page-id}/feed Depending on your use case, try and make a POST request to any endpoint that makes use of these permissions. That should help get rid of the error.
I am developing an app, and users will be able to log in with Facebook. They only can start using the app if a minimum of their Facebook friend are already using the app. If not, they have to wait until the minimum required number of friend use the app in order to use it. I want to allow them to invite their Facebook friends to join.
Also, I would like to know how I can make it happen?
Do I HAVE TO create a facebook canvas or is there any other ways I can make it works?
Thank you for your help.
https://developers.facebook.com/docs/apps/faq#invite_to_app
Games on Canvas: App Request
Other Apps/Games: Send Dialog or Message Dialog
You can't access invitable_friends without enabling facebook canvas in your app's settings, but maybe app requests safisfy your needs? It will list friends (user needs to authorise reading friends list by app) and allow user to send them a notification in their mobile facebook app which will open an app or take user to app's page in App Store if they haven't installed your app yet.
Remember to enable deep linking, facebook SSO and provide App Store ID in platform settings for this work.
https://developers.facebook.com/docs/games/requests/
For a user to be able to message an open-graph story via the new Facebook Messenger functionality (messaging an open graph message), does the user need to be logged in to Facebook in my app?
I am talking about the new functionality presented by Facebook at their f8 conference (sending an open graph story to friends through Facebook Messenger).
I'm pretty sure I have everything set up correctly in my mobile app. But the problem is that the other testers (people registered as testers in my app on Facebook) are receiving the open graph story correctly, but when tapping on the open graph story, even though Facebook Messenger redirects to the right app (my app), the FBAppCall object doesn't contain any targetURL information, there is no &target_url=.... ...even though my open graph object has a proper URL set.
That is why I am thinking: Does the user need to also POST the open-graph the story somewhere (thus the user needs to be logged in with Facebook), in order for Facebook Messenger to be able to get the object's URL later?
It seems like this shouldn't be the case, as opening this new functionality of sharing through messenger should be just about getting rid that friction when sharing a story.
does the user need to be logged in to Facebook?
No, he doesn't.
does the user need to be logged in to Facebook in my app?
You must have a valid client token, which means your user must have authorized your app. Just once. Then he can log out from Facebook and/or your app, and you can keep the token on your database and make as many requests as you want, regardless of the user being logged in anywhere.
That means: After the user logs out from facebook, you still get to keep the client token for as long as you want (Well, they do expire: take a look at https://developers.facebook.com/docs/facebook-login/access-tokens/ for more info), and use it to make requests on behalf of the user as you please, using any of the permissions your app was granted by the user (read messages, send messages, post on my behalf, etc.).
In order to share an open graph story through facebook messenger, there must be a story to share published somewhere, of course.
Take on account privacy settings may prevent user/app A from seeing a user/app B story shared by someone else (user/app C) if user/app A didn't have permission to see the original post in the first place (happens when posting with 'only to friends' privacy setting, for example)
The best you can do: debug the responses your app is getting from Facebook. Every time something unusual occurs Facebook will notify you. Are you sure you are not getting any errors/warning messages?
I want to get list of my friends from Facebook who are not users of my app, and be able to invite them.
Using FBWebDialogs I can pick users, but I'm wondering how foursquare did it?
Screenshot:
There is option of frictionless requests.
On Facebook developer site they mentioned in section of Invites and Requests
We touched on a scenario where users exchange requests back and forth. If this scenario is typical in your game, it can be a bad user experience to force them through the request dialog every time they want to send a request. The solution for this is frictionless requests.
Frictionless requests let users send requests to friends from an app without having to click on a pop-up confirmation dialog. When sending a request to a friend, a user can authorize the app to send subsequent requests to the same friend without another dialog. This streamlines the process of sharing with friends.
For more reference see Facebook Invites and Requests
You are asking two questions here:
How to invite Facebook friends without web dialogs?
Unfortunately, the web dialogs you are referring to are the best way to send invites to friends. There was a time when we had to resort to ugly hacks just to get this functionality in applications. Facebook added this functionality to iOS SDK after developers created bug reports and were literally behind them.
Get a list of friends who are not using the app and invite them
Foursquare IMO is not using the requests API. What they do is, whenever somebody links their Facebook account to their Foursquare account they make a note of the users friends who are using/not using the app. This is possible if the user grants the app permissions.
Then in the invite screen, they simply build a UITableView with list of friends who they think are not using the app. When you tap Invite they will just send an email invitation and not the Facebook request you are referring to.
I think FourSquare syncing the user's friend list(friend ids) to its own server.. Then after they are checking it to create the custom interface like the screen shot you shared.
Maybe I didn't get the question right, but from what I know after you tap the invite button on Foursquare the Facebook invite dialog (apprequest) will pop up.
In general this dialog will let you select friends if you didn't specify any friends ids before presenting it, or show you the selected friends like in Foursquare example.
There is an API to get your FB friends, so it's possible for your server to check witch of then already has the app...
I've been researching this for a while and the main solution I have found is frictionless requests, as Rahul Patel noted. You can do a direct request to the graph API and see who has your app installed.
From there you could fairly easily implement any sort of filtering. For example, using the Friend Picker UI Control and implementing the method friendPickerViewController:shouldIncludeUser: and checking against a list of facebook ids who are not on the app that you cache somewhere else in your application and actively update it (for example in a simple core data model that is updated when appDidFinishLaunching), returning no if the user is not displayed. This would only allow users to select individuals who are not on the app, and then you could send a request to them under the hood with frictionless requests.
I do think that it is not a great idea to spam people, however, without at least allowing them to check the names of their friends, or see who they are.