How to have a FB application create a personalized post to a user - post

I've read over some of the developer material and have not seen a way to have an application send facebook users personalized wall posts. For example, FB users who likes "Mustangs" could receive a post from my application when there is news specifcally about Mustangs. However, FB users who didn't select Mustangs would not receive the post. Is there a way to do this on the FB platform for applications?
FYI - The only success I have had is sending a post to a user which appears to have been sent from the user as if the user is posting to themselves. Only upon close inspection can one find the text "via application xyz" next to the post time.
Thanks for taking the time to read and respond.

Yes, you can do this with any of the frameworks. See https://developers.facebook.com/docs/sdks/ Also study up on the Graph API (pay attention to the from attribute of a feed item, testing it out using the graph API Exporer: https://developers.facebook.com/tools/explorer

Related

Facebook SDK iOS invite user without FBWebDialogs

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.

How to implement auto publish to user's facebook timeline just like Instagram?

I am building a social app that user can post into my app. Data stores in our own server and display to iOS native app. I am trying to make the post that user publish to our app to user's facebook timeline. I know that I can post data to my server and then let my app use graph api to publish data directly to facebook timeline. But that will be double post and make the transfer data double which I think might not be a good practise.
So I want to post it to my server first and let server do the rest. Just like shown in facebook docuement
"Auth on Client, API Calls from Server"
https://developers.facebook.com/docs/facebook-login/access-tokens/
But I wonder if this is the case for my app. Because as shown in the diagram "API calls are forwarded to server as a proxy for Facebook API calls" . And this is not the case for my app. Because the API calls will be initiated in the server side when the user use client to post new data.
I wonder how most app implement this.For example ,app such as Instagram and other social app. I am not sure if I do just as I explain will violate any facebook term of usage .
TIA,
Kong
your case perfectly suits the model in the chart.
You said "I am trying to make the post that user publish to our app to user's facebook timeline". I'm assuming you are attempting to mimic instagram since you mentioned it. Let's say user A 'logged-in-by-facebook' on your app and made a post within your app, the app posted to your server (and push back to other users of your Android/iPhone app so they can see, right?). At this time, there's nothing to post to the user's timeline, the scope is in your app only. If the user chooses to post to his Facebook timeline, you take that very same post (which is now saved on your server) and made the call to Graph API and post there, so his friends on FB just see the FB version, not the one within your app.

Twitter Framework on iOS - Posting Tweets

Since the Twitter Framework handles the login authentication, does that mean I can freely post a tweets to the user's wall?
Since logging into twitter through the settings page gives permission access to all games, what if some games abuse it and spam a user's twitter page? If the user gets spammed and wants to block only that game, is that possible?
My game will be doing automatic posts whenever a user accomplishes something, should I be asking for permission every time before posting a tweet? or should I simply post a tweet and hope it's not seen as spam?
You can show the tweet dialog to the user, and that would post it for you. It is fairly easy to do this, here is a great tutorial for how:
http://www.raywenderlich.com/21558/beginning-twitter-tutorial-updated-for-ios-6

How do I submit my Facebook graph api action for approval?

I have a mobile phone app, supporting web site and a Facebook account
When certain actions are taken on my phone app I interact with my web server. My web server then posts some info to a page on MY Facebook account.
I chose to use the graph api to achieve the posts to my Facebook page but I can see no way of complying with Facebooks requirements for submission.
When I try to submit facebook states the following
No Aggregations created for this Action Type. Please create a
completed Aggregation populated with sample data before submitting for
review.
Firstly I have no idea what an aggregation is?
Then the docs state
Review your Action Type before submitting for approval. Make sure your
definition is complete and your app is testable end-to-end for
publishing actions of this Action Type
Which makes sense but how do I get my mobile app to Facebook staff so they can test?
I should add that all works fine in development mode
If you are trying to create an action via the Facebook Open Graph Beta, you should first look into the documentation here. There you will find all information on actions, objects and aggregations you can generate on the timeline.
Further you will have to go to the subsection Open Graph of your App Settings:
https://developers.facebook.com/apps/YOUR_APP_ID/opengraph and create your aggregations populated with sample data.
If you want to make a simple post though, then use the Graph API and POST a Post object to the feed connection of the User object. There are a lot of examples and tutorials on the web and a lot of questions on that matter here on stackoverflow.

Inviting Facebook friends through iPhone App

I've been searching this question, and I haven't been able to find anything that works. I have an iPhone app that allows users to link their Facebook account. It would look something like this:
Once a user has successfully linked to FB, I want to present them with a list of their FB friends and an option to invite selected friends.
FB Friend 1........... Invite
FB Friend 2........... Invite
...
FB Friend 1000..... Invite
Basically, I want to send a message to FB friends that says something like "Check out this app". I'm pretty sure this has to go to either their notifications or wall and cannot go as a FB message, but I can't figure out how to do it.
Also, I don't need to select a group of friends to invite -- this can be done one at a time. So it would look like this:
FB Friend 1........... invited
FB Friend 2........... Invite
...
FB Friend 1000..... Invite
Thanks so much for any help you can provide.
Unfortunately there isn't anything in the iOS SDK that presents the apprequests dialog, and a user has to have installed/approved your application before you can send them application notifications via a POST request...
Requests are a great way to enable users to invite their friends,
accept a gift or help them complete a mission in your app. There are
now two types of requests that can be sent from an app:
User-generated requests: These requests are confirmed by a user’s
explicit action on a request dialog. These requests update the
bookmark count for the recipient. You send requests by using the
recently launched Request Dialog.
App-generated requests: These
requests can be initiated and sent only to users who have authorized
your app. Developers can send these requests using the Graph API. Use
these requests to update the bookmark count to encourage a user to
re-engage in the app (e.g., your friend finished her move in a game
and it’s now your turn).
The only way to get this is via Facebook's Requests 2.0 dialog (which is not currently available to the Facebook iOS SDK):
http://developers.facebook.com/blog/post/453
See more here in this related question...
Sending application requests that appear in the left column on Facebook home page?

Resources