Do I really need to register an app to show a simple 'friends' list on my website? - facebook-graph-api

I want to use the Facebook (Graph) API to show a list of names and pictures of friends of a facebook account (which I own). Do I really need to register my website as an app for this? Since I don't really think of my website as an app... Or can I somehow get an access token that doesn't expire since I can grant access to this list of friends myself?

Think of an app on Facebook as an API Key. Your App is how Facebook identifies who is making the call, what permissions you have, and if you are abusing the system or not.
And no, you can't get access to most Graph API data without a valid Facebook App.

Related

How to access facebook API without creating facebook App

I'm currently researching on how to use facebook API and collect its data thru streamsets and store it to S3. But facebook requires developer to create an app and verify it which somehow not applicable to what I'm doing right now. Is there other way to do this? like different process to access the Facebook API without creating an App?
While I'm happy to stand to be corrected, I do not believe this can be done.
It's not like you have to actually MAKE an app with your "app" - the app is simply an API key that has some associated data with it like titles and URLs and such. This also helps them track your usage and make sure you're following the rules, and block your key if you don't.

Graph API - as user?

I am trying to get to grips with the Graph API. Is i,t correctly understood that if I want to ask for my own, say friends, through code, I should
register my application and get an app access token
Login with my own credentials and get an user access token?
I find it difficult to grasp the concepts from the documentation.
The flow should go like :
User adds the app and gives the permissions.
Which returns the access_token (user access token) which is used to query datas.
Generally speaking, You ask for permissions, and you get a key which can open the locked contents. That is the access_token.
Difference between App Access_token and User access_token :
App access_token is needed when you do something as the app. Like getting the insights for the app, or working with subscriptions, so and so.
User access_token is needed when you want to act as the user who have the app added in their account.
With reference to your question, You clearly doesnt need App access_token.
You need to do both.
Registering your application tells Facebook where those requests are coming from. They monitor what requests your app is making to police apps that violate your terms.
Once you have that app, you personally authenticate it to get information from or post information to Facebook on your behalf. The app must ask for specific permissions and you have to grant these for it to work.

facebook graph api: how to use me correctly?

i am trying to use /me/likes/pageID the same way i used pages.isFan (REST API).
But it always uses the user/page as me for which i created the access token and not the current active user.
can't get my head around this one, any help is appreciated!
thanks
[from comments] but do i really need to create an application to "just" check if the user is fan of my own page? and even ask his authorization?
Yes, you will need an app in any case.
If you run your app as a canvas or page tab app inside of Facebook, then you get the info if the current user liked the very Facebook fan page the app is running in(!) directly from the signed_request parameter.
If you want to query this infor for other pages, and/or your app is running outside of Facebook, then you have to have the user connect to your app and ask permission to read his likes first, before you can get this info.
For information on the latter case, see https://developers.facebook.com/docs/authentication/, https://developers.facebook.com/docs/authentication/permissions/#user_friends_perms, https://developers.facebook.com/docs/reference/api/user/#likes
It is easy: With the new Graph API, the owner of the access token is me. You can see this by pasting an access token into the debugger.
You should be authenticating your user and gaining an access token in their name each time they visit your site. Then use only this access token when you make your query.
This process is easiest if you use one of the Facebook SDKs.

Facebook Integration Static access token

I'm trying to use the facebook API on the backend of a website. Essentially, I want to be able to create events using a Djano app and have it create the corresponding facebook events.
The organization I am creating events for already have a facebook page. I only am concerned with posting events on that organization's page. I am the admin for the organization so I know all the login info.
What I am am trying to figure out is how I can setup the access token such thatit just works for the organization without any need to login to the facebook app. I was thinking that setting a static access token would do the trick, but I cannot find anyway to do it.
So, what is the standard way to create a facebook app that only interfaces with one predefined user?
Im not entirely sure what you're trying to do. However the static access token has now been deprecated. Do you want to: create an event for the person using the page, or for the company's page/profile?
Hope I can help

How to use Facebook APIs to show one's friends list to other visitors?

I'm able to fetch my friends list using Facebook API (which requires me to log into my FB account) and I'm trying to show my friends list to other people visit my site.
I've tried using Twitter and its quite simple. https://api.twitter.com/1/friends/ids.json?cursor=-1&screen_name=codef0rmer returns my followers ids.
Is that possible using Facebook API, If yes, How to do that?
To access the /friends connection you need a valid access token for the current session. This means you can't access this connection for other users
https://developers.facebook.com/docs/reference/api/user/
https://developers.facebook.com/docs/reference/fql/friend/
This means that unless you get a users friends and store them in your database, you won't be able to do this. ( Unless you use longer living access tokens (I say longer living as offline access is being deprecated)
Saying this, I'm not sure if you are allowed to store this information. I know friendslists aren't allowed to be shown to other users so this is potentially dangerous territory on facebook TOS. The privacy policy is here https://developers.facebook.com/policy/ but I think this is something you may need to clarify with Facebook directly as it looks like a slightly grey area