How to use facebook api graph as a url? - facebook

I get success on Graph API Explorer like in image
https://i.imgur.com/0UbLNej.png
Then i tried to use as URL to do like this.
https://graph.facebook.com/?method=GET&path=5550296508_10157403661361509%2Fattachments&version=v2.10/access_token=my_tokon
But not work, it's show error text.
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "C8XLXuSaBez"
}
}
How can i do ?

You need an access_token to get the response from Facebook Graph Api. you are trying to get attachments using post-id from /v2.10/{post-id}/attachments endpoint.
In the Graph API Explorer, you can generate access_token using get_token button, then you can frame URL to get response as follows:
https://graph.facebook.com/v2.10/5550296508_10157403661361509/attachments?access_token={access_token}

Related

How to implement Graph-API to get data of Facebook Workplace

I have implemented Facebook API in our APP by using Graph-API. Now I am trying to implement FB-workplace in my application, but i am not able to get any workplace details by using graph-API. I am having my access_token.
I am using FB Graph-API explorer and Postman, but from both the ways i am getting nothing/Error. So What would i change in this to get that data or any more permission needs to update.
Please help in this.
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AjRPf0Xnp7tkluvI9kWo"
}
}

Facebook Graph API Can't read public photo comments

I'm trying to read all comments from some FB public post (w/ photo). I found some docs about FB Graph API and build the folowing request. But it fails.
https://developers.facebook.com/tools/explorer/?method=GET&path=1542065625839944&version=v2.11
But I get this:
{
"error": {
"message": "Unsupported get request. Object with ID '1542065625839944' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "HQFdeKx0lqh"
}
}
I also tried with user id 100001095643511_1542065625839944
https://developers.facebook.com/tools/explorer/?method=GET&path=100001095643511_1542065625839944%2Fphotos&version=v2.11
What am I doing wrong? Or is there other easy way to get comments?

An accessToken issue using the Graph API

I'm trying to make a GET request from the Facebook Graph API, graph.facebook.com (using Postman, a Chrome application) to get all events containing the key word as below:
graph.facebook.com/v2.8/search?pretty=0&q=<MY_CITY>&type=event&accessToken=<MY_APP_ACCESS_TOKEN>
I'm having this response from Facebook:
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104,
"fbtrace_id": "B5KWVqr7ajK"
}
}
I've rechecked my app_access_Token, and it's fine and works for other requests. How can I fix this problem?
https://developers.facebook.com/docs/graph-api/using-graph-api/#search:
All Graph API search queries require an access token included in the request. You need a user access token to execute a search.

Getting Facebook Album Photo's on External Website using Graph API

I'm trying to get Facebook album data on a site, using the Facebook Graph API.
I'm trying to do so via Ajax or Postman but I can't get it to work.
I can make a normal https://graph.facebook.com/me call and get my name (i.e. this shows that I got the proper access token in Postman and can see the JSON).
It's when I try to do a call to get the JSON for the album that I get this error below (again the access token is there like the call above)
From the URL, I get the ID of the album:
https://www.facebook.com/amir.sobhi.94/media_set?set=a.693877XXx02412.100004404098018&type=3
and the error was ...
{
"error": {
"message": "Unsupported get request. Object with ID '693877XXx02412' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "DHWlSshJtTU"
}
}

Get facebook album give error code 100

I use simple app but cannot understand next:
Opened 2 urls:
https://www.facebook.com/media/set/?set=a.675416519138045.1073741830.660049570674740&type=3
AND
https://www.facebook.com/joyasmariajose.valdivieso/media_set?set=a.383620231706322.80737.100001750452794&type=3
When I use Graph Exploder:
GET \675416519138045
return all information about album in this user
But When I try
GET \383620231706322
I can get only user_id and name. On the album have next error:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "Hb9lKBi2Wpz"
}
}
Question: What can be wrong with second url ?
Unsupported get request usually means that you can't access that resource without an Access Token, i.e. you don't have permissions to this object, as #CBroe said.