When I try to upload a photo using the graph API, I get the following error:
{ "error": {
"message": "(#324) Requires upload file",
"type": "OAuthException",
"code": 324,
"fbtrace_id": "Gs78FKPAclY" } }
I am testing this functionality with the same code given on: Uploading Photos and publishing Photo stories in Graph API
specifically, caption=test, URL=https://www.facebook.com/images/fb_icon_325x325.png
and the post is: me/photos.
Does anyone know why?
Thanks in advance.
The problem is that the url field needs to be specified in lowercase, not uppercase, i.e. "url" not "URL". If you specify "URL" then the Graph API returns the error code 324.
Related
I am using facebook's api for instagram and I am able to query a hashtag feed by using the permissions manage_pages and instagram_basic and calling this in the facebook graph api .
17842314694065016/recent_media?fields=caption,comments_count,permalink,like_count,media_type,id,children{media_type,media_url},media_url&user_id=17841400646076739
And I get a response like this.
"caption": "You're going to love this one 🌊 Share with your friends
Credit to samcorgi",
"comments_count": 1,
"permalink": "https://www.instagram.com/p/B1ZPktWBah0/",
"like_count": 6,
"media_type": "VIDEO",
"id": "17850934621537158",
"media_url": "https://scontent.xx.fbcdn.net/v/t50.2886-..."
},
The media url that returns is only the video. How can I get the video thumbnail for this too? Keep in mind this is a hashtag feed and not a users feed.
I have tried making a seperate call like using the id of the video
17850934621537158?fields=thumbnail_url
however, I am getting this error.
"error": {
"message": "Unsupported get request. Object with ID '17850934621537158'
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": "AVB0L7jlmb2NCTIxTEXbWKD"
}
Can someone shed some light on this problem and a work around?
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}
I read the example of Graph API document at this: https://developers.facebook.com/docs/graph-api/reference/privacy/, and try to get the privacy of specified post but no luck. The link I tried is:
https://graph.facebook.com/me/?fields=value&access_token=<my token>
Response:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (value) on node type (User)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "DSUBZSZdJT8"
}
}
Please help me.
The error message is very clear, there is no field called "value" in the user table - which is exactly what you are trying to access with the /me endpoint. This would be the API call to get the privacy setting of a specific post:
https://graph.facebook.com/{post-id}?fields=privacy{value}&access_token={user-token}
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.
Can someone help me with an answer?
Why some pages in Facebook Graph returns
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
page exists at: https://www.facebook.com/RoyalCaninRomania
and facebook graph return: http://graph.facebook.com/RoyalCaninRomania or graph.facebook.com/669235549759213
but in developer is all fine:
developers.facebook.com/tools/explorer/?method=GET&path=669235549759213
he generate graph.facebook.com/669235549759213 url, but this url generate error message in browser
Worked perfectly fine with me.
I believe this issue is closed.
here is the link : http://graph.facebook.com/v2.1/146337548715685