I've got a website I'm doing around a bunch of athletes.
All of these athletes have a Facebook account.
The client wants to show each of these athletes Facebook timelines on their individual profile pages using only their Facebook profile handle that they will provide.
I'm very unfamiliar with the Facebook API but am 99% sure this isn't possible as each of the athletes would have to go to the Facebook developers portal and set up an app right?
Is there any way to achieve this at all?
Nop, you're wrong. Your athletes don't have to setup an app. But, on the other hand, you or the developer responsible for that project, must setup an app at the Facebook developers website.
I'm not going to explain all the process, since the Facebook docs are quite easy to understand.
https://developers.facebook.com/docs/
After you setup your facebook app and integrate it with your website, it's time to start asking the athletes authorization you have plenty of ways to do that, you can either use Facebook Login, Dialogs or evenManually Build a Login Flow.
Keep in mind that you have different permissions, here's a full list of the permissions and a small description explaining what's their purpose.
Each athlete would have to grant permissions to your app, then after they do that, you will get an Access Token and the Facebook User ID, usually the Access Token has a short period of life (aprox. 2 hours), but you can trade this Access Token for a long one with a life time of aprox. 60 days. You can read more about Access Tokens here
After your athletes grant permissions to your app, you can access to their timelines. Keep in mind that it won't be exactly as their timeline on Facebook. To grab user info you can either use Graph API nodes, or if need a more complex and detailed info you can query it using FQL
Related
I have the task to integrate some commercial sharing stuff into a website.
The idea is that the user a) logs in/registers in the website, b) the user connects his user account with his facebook account - by adding and accepting the website application.
Here comes the interesting part - is there a way of linking the facebook account with my website's account so that I can send them updates and promotions directly to their walls programatically?
In the application dialog, it's clearly noted that the user allows the application to write to the user wall so they accept and agree this. Then, for example, if I want to send them a promotion or update directly on their wall using the fb application api, how can I achieve this? All the tutorials I've read consider the user using the Facebook Login
The concrete idea is something like weekly promotion feed that my clients want to allow customers to allow being posted directly on their walls. As I don't have any experience with facebook development, I'd appreciate knowing how, if at all possible, this can be achieved?
Most of what you're suggesting is against policy, and isnt' technically possible either as users need to come back to the app once every 60 days for you to have a valid access_token for them.
The Authentication docs explain how to get access to a user's information with their permission, and the Permission documentation explains which permissions grant access to which functions or fields.
From the documentation it seems that the user should always authorize the Facebook application even to access basic permissions.
However, sites like Rotten Tomatoes and Clicker.com auto-authorize the logged facebook user without showing the authorization dialog. If you visit one of those sites for the first time they will be able to access your public data without you authorizing it. If I go to the Apps on my facebook settings, an entry will appear showing that I gave access to those applications (but I DID NOT).
How can this be possible? Is it related to the "Instant Personalization" feature for selected partners?
Thanks
Well, I was doing some research and yes, it's all about Instant Personalization.
From Facebook:
We've partnered with a few websites to provide you with great,
personalized experiences the moment you arrive, such as immediately
playing the music you like or displaying friends' reviews. To tailor
your experience, these partners only access public information (like
your name and profile picture) and other information you've made
public.
From one of its partners:
Clicker.com
So -at the time I'm writing this- unless you're a partner of Facebook, you'll have to show the old OAuth dialog.
Hope it helps!
This is my first post in this facebook's stackoverflow forum. My background is on wireless baseband prototyping on FPGA platform and do not have any prior experience with facebook development. Now i have a chance to work on social network related development work and i'm quite excited. Anyway above is just my background introduction.
Here i want to create a virtual Facebook user. Imagine you are interacting with your refrigerator on Facebook. This is the kind of concept we want to show.
Following are the functionality i would like to have at my virtual's facebook account..
1) recognize real friend check-in and messages posted on his/her wall.
2) ability to write messages on real friend's wall.
3) recognize messages posted on virtual account's wall.
4) ability to write message on virtual account wall.
How can the virtual account be equipped with such functionalities? Can i achieve by writing a facebook application? Please advise the direction i should look at.
Cheers,
Phone Naing
The facebook api lets you query their graph but it requires an access token to do that.
There are 3 main token types: User, Page and App.
Your app would be able to get an app token easily but it's limited to public data only, like data of public pages.
For a page and user tokens you'll need the actual user to interact with your app in order to get the token.
You can get the friends check-ins, feed, images, events and so on by asking for the right permissions from the user (there are user permissions and friends permissions).
You can also post to friends wall with the "publish_stream" permission.
For "recognizing" posted items on a user wall you can either recheck the user feed every once and a while and compare what you had and what you get or use the Real-time Updates.
With all of that said, I seriously doubt that you'll manage to pull something like that with the current limitations of the facebook api.
Let's start with the fact that facebook does not like profiles to be "vritual", they want the profiles to be of real people.
Of course that there are plenty of virtual profiles but they can remove them (and sometimes do).
Even if you do have these virtual profiles, since they are virtual they won't interact with your application using facebook, that is won't be logged in to facebook via their channels (web interface, android or iOS, etc).
Because of that you won't be able to get a user access token which you need for all of the information you want.
Since the deprecation of the offline_access permission there's no way to have a token which is valid for a user for more than about 2 months, which means that for each "virtual user" you'll need to log him in to facebook and then interact with your app to get a new token.
You can create a page instead of a virtual profile, which will also be fine with facebook.
But here again, you need a user to actually interact with facebook and your app to get a valid page access token, and even if you get that, it's not enough for the data you want to ask for.
To put it all together:
I think it can't be done.
I created a little Facebook app that posts to people's walls when they have a birthday coming up. This is all good, but there's a concept I'm not quite understanding.
I'm using a cron job to run a script that searches through users and posts to the ones that have birthdays on that day. I've created a Facebook account for the app so the post should be under the apps account. What I'm confused on is how is the script going to know to post from the app's Facebook account? Do I need to log in through the script somehow? If so, how do I go about doing that?
You are very close to the answer! Yes - you are correct, the application needs to use a certain access_token to performa actions "on-behalf" of the application.
You should read the Facebook Authentication Documentation under the header - "App Login" to learn how to obtain the app access token. After you have this token the methods you use to publish post are identical to regular posts.
My app stores the Facebook Access Token for offline use. The main purpose of the app is to allow users to automatically posts on the walls of people within a specified number of days of their friends birthday.
My app has been blocked by Facebook due to spam (some users are sending marketing messages to their friends instead of using the app for it's purpose).
I want to find out who those users are and block their access to my application. The only problem is that my Facebook App has a few hundred access tokens (one for each user of my application). The insights dashboard does not provide me with stats per access token. I need to find out which of my users are getting their wall posts reported as spam.
Is there any way of doing this?
After appealing, Facebook has unblocked my application but I don't want it to happen again. As far as I can tell, I can find out the number of people who have reported the wall posts as spam...but I don't know which access token made those posts...and hence don't know which of my users is posting spam messages.
It's not Facebook job to keep track of your application internal activities. You should be logging every activity, at least posts ids returned when someone posts anything on their friends' wall.
And one more time... you DON'T need the offline_access permission to publish something when the user is offline!