Facebook Graph API - facebook

Can I use the Facebook Graph API without the creation of my Facebook Application? As I understand it, for each operation I need to use the OAuth key. And I can only get user OAuth key if they authorize my Facebook application. Am I right?
I need to get user feed, and post to it.

Facebook Graph Api needs your APP ID which you can only get from your Facebook application. So i think its not possible to post data on facebook without having Application ID.

You can use this tool to dynamically generate an access_token for testing: https://developers.facebook.com/tools/explorer/
Also, check out RapidAPI here. I've specifically linked you to the FacebookGraphAPI block. Here you can instantaneously connect to numerous Facebook endpoints. The platform will generate a code snippet that you can directly insert into your code.

Depends on what you want to do, for most tasks you have to have an app id... but If you want to get the amount of shares for a certain page, for example, you can do it with no app ID.

I think there is FBML (facebooks mark up language) which you can embed on your site which can handle some basic tasks like commenting or liking.

No, You can't do that as Facebook Graph API needs access token which u can get only by authorising your logged-in user by your (Created) App in Facebook.

Related

Can I access a Facebook Page with the Graph API without creating an app?

In the past, I think a Facebook Page access token could be generated manually, and then used with the graph API to query posts, comments, likes, shares, etc. Now it seems you cannot query anything without developing an app that I login to and then in turn the app generates the access token. Is that true? For example, this question from 2015 claims no access token is needed for public data, but when I try their example it returns "An access token is required to request this resource."
I'm the admin of my page that ran a basic contest (giveaway). I'd like to use the graph API to fetch the names of people that liked, shared, or commented on a post. Then I want to cross reference it with those that like the page. Do I have to register and develop an app for this? Does my page have an access token available without going through the app registration and review process?
Can I access a Facebook Page with the Graph API without creating an app?
No, that is not possible. You always have to use an App for any API Access.
Then I want to cross reference it with those that like the page.
That is not possible either, not even with an App. I assume you want to make sure that participants like your Page - which is not allowed. People cannot be "incentivized" to like your Page.
Platform Policy: https://developers.facebook.com/policy/
Explanation about the specific rule against requiring people to like your Page: https://developers.facebook.com/docs/apps/examples-platform-policy-4.5

Post status update to Page Wall

I'am really new to all this Facebook development, and I wanted to integrate Facebook within my personal website.
I am now trying to test if what I want is possible.
I want to post a status from my server, via php/js to my Page in Facebook.
How can I do so?
B.W.
I saw that there is this FBJS function called "Facebook.streamPublish"
But I don't know how to integrate it.
Is there any possible way to do so?
Can you give me an example?
-Secondly, what is an access token?
You get an access_token after facebook authenticates you. You will need this access_token for all subsequent API calls. You can find the details here:
http://developers.facebook.com/docs/authentication/
You can use graph API for publishing on the wall and doing other allowed actions. Details of publishing api can be found here:
http://developers.facebook.com/docs/reference/api/post/
But do have a look on the facebook policy, because publishing automatically to a wall is considered violation.
http://developers.facebook.com/policy/

facebook graph version of post_authorize_redirect_url

I'm working on a canvas app and am using the Graph api. There used to be in the REST api a post_authorize_redirect_url for a place to land someone after they first authorize your app (see here for http://developers.facebook.com/docs/appproperties/ ). Is there an analagous concept in current canvas app?
thx
With the Graph API, you use the redirect_uri parameter. For example:
http://www.facebook.com/dialog/oauth/?response_type=code&redirect_uri={URL}&scope=email&client_id=12345
Details available here: http://developers.facebook.com/docs/authentication/
There is not (anymore). You'll need to track yourself if the user has just authorized or is a returning user. Just check your database for the user id, which you are allowed to store. Of course you'll need to store the id at some point of your app.

Offline access to FB graph api from Javascript SDK

How do you query facebook's graph api via the javascript sdk for users that have allready given you permissions (offline access) and whose auth data you have stored, but who are not currently logged in to facebook?
To answer my question, you can in fact do so. You can use FB.api calls and include the access token at the end of the URL with ?access_token=
I'm not 100% sure of the code you'd need to actually do it, but I think one of the key elements to this would be logging in to the SDK as an application, rather than a Facebook User, as detailed in the documentation # http://developers.facebook.com/docs/authentication
Have you got an example query that you'd like to make with the SDK?

Which Facebook APIs can be used to programatically post a message?

I have an application that allows a user to post messages. I'd like to give an option to users to propagate the same posts on their Facebook wall / status. Which Facebook APIs can I leverage, including the ones that are need to authenticate the user?
You can use Facebook's JS API (useful for client-side), the new Graph API, or the old REST API. Facebook has extensive documentation at http://developers.facebook.com/docs/
The easiest path is probably to use the Facebook.streamPublish() function through the FBJS API.
You can also use streamPublish() through direct Facebook API calls, but you need extended permissions. Using FBJS, Facebook will display their own prompt to the user, so you do not need extended permissions.