Using Facebook Graph to get URL of Cover Photo - facebook

I used to be able to get the URL of the cover photo using me?fields=cover
However, it does not seem to show the URL anymore.

https://developers.facebook.com/docs/graph-api/changelog/version3.0
According to the changelog, the cover field is deprecated and will not work anymore in Apps with Graph API v3.0+.

Related

GET Facebook Page Post Video Source is not working

I am using Facebook Graph API, to get Page post.
https://graph.facebook.com/v2.7/357708837646769/posts?access_token=TOKEN&limit=25&fields=id,name,type,link,description,message,picture,source,from,created_time,object_id,shares,likes.limit(1).summary(true),full_picture
This API works fine. and returns value.
However when I get a post type video, I try to fetch to Video Source using below API:
https://graph.facebook.com/v2.7/716404295377384/?access_token=TOKEN&fields=source
https://graph.facebook.com/v3.1/716404295377384/?access_token=TOKEN&fields=source
Here is the Page post doc on Facebook
https://developers.facebook.com/docs/graph-api/reference/v3.1/post
If we check the fields, for source it says:
Name: source
Description: A URL to any Flash movie or video file attached to the post.
Type: string
However, the API is not returning any value for "source" field. Tried with both 2.7 & 3.1 Graph API version. Also Facebook has not mentioned anywhere, that the "source" field is deprecated or won't be available in API.
Any help?
Also Facebook has not mentioned anywhere, that the "source" field is deprecated or won't be available in API.
They mention the following change in the changelog for v2.12,
https://developers.facebook.com/docs/graph-api/changelog/version2.12#gapi-90-videos
Page-owned videos — The source field will no longer be returned for Page-owned videos unless the User making the request has a role on the owning Page.
So, are you using the right kind of access token …?

Facebook API - How to post a website link with a custom image?

My goal is to post to my FB page (/{page-id}/feed) a link to a website, choosing the image to show instead of the picture scraped automatically from the web page. The image I'd like to show is not in the web page, so I cannot use the og:image tag.
I'm using the current API (v2.9) and this is what I've tried so far in the Graph API Explorer:
the picture parameter, that does not work as expected (it doesn't replace the automatic image)
picture and link parameters both pointing to the image url, with an action button, but it must have the same url used for the link parameter
the child_attachments parameter, but I need at least 2 images and the final result is quite different, too
additional fields of the link parameter, but thy were removed in the 2.9 API
a lot of combinations between these parameters, with no luck
What am I missing?
For information regarding why it isn't working. I assume they removed it to force users to add it to their website like Twitter did with their Twitter cards and maybe to stop impersonating pages.
https://developers.facebook.com/docs/sharing/reference/feed-dialog#deprecated-params

Photo post insights with Facebook Graph API v2.4

We are using version 2.3 of the FB graph API to get insights (specifically viral impressions, reach, engaged, talking about, and impressions) for a page photo post. It works without issue. However when we try to make this same call in version 2.4, it fails. See an example call we used in the Graph API explorer below
/1129724967054634_1214739968553133/insights/?metric=['post_impressions_unique']
We've tried both PageID_ObjectID and PageID_Photo ID in the call, but neither returns the insights data mentioned above. We can get likes and comments for the Object, but nothing at all for the Photo. Are we missing some change in the way Facebook treats page photo posts between versions?

Unity facebook SDK, can not post picture with FB.Feed

In my Unity IOS game, I am unsuccessfully trying to use FB.Feed to share a screenshot on the user's wall.
Facebook documentation uses FB.Api to publish the screenshot, but this method does not display a share dialog, it simply uploads the pic to Facebook.
Answers I have found so far:
Upload the picture using FB.Api, and then parse the FBResult for the picture URL, and feed that to FB.Feed Link to answer.
This method triggers an error, since it is not possible to use a Facebook URL as source for a picture.
Save the picture locally and prepend "File://" to the picture path. Link to question. This does not seem to work either, and the Facebook documentation does not seem to have any information on URL formatting.
My question:
Is this the correct (and only) way to display a share dialog when publishing a picture? Or am I looking in the wrong direction?
FB.Feed only allows you to post link to images. It doesn't upload the images to Facebook. Therefore, these images need to hosted somewhere on the net and not locally.
The best way to make it work is either upload the images to FB (with privacy property set to EVERYONE) using FB.API, and then share the link to that picture via FB.Feed. If you don't want to create duplicate stories, i.e. one from posting the picture and another from FB.Feed, make sure that you set no_story to true.

Post object, status_type property doesn't work?

We're able to post to user's FB timeline/page as the page, no problem. The issue is the post that our app is posting is way smaller than post that a page/user can post to the feed manually.
We've tried to change status_type to one of mobile_status_update, created_note, added_photos, added_video, shared_story, created_group, created_event, wall_post, app_created_story, published_story, tagged_in_photo, approved_friend according to the API (https://developers.facebook.com/docs/reference/api/post/) but neither of these change how the post looks in the feed.
Has anyone been able to post content to timeline/page wall through an APP that looks as if it was posted manually - specifically size of the image?
Sample page post that was posted through our app as page owner - image is small:
Sample page post that was posted manually - large image. We'd like the one above to look like this as well when posted through the app:
status_type is set automatically. You can't set it yourself.
In the case of the manual post, you added a photo. To do that in the API, you have to query /PROFILE_ID/photos.
What you did through the API most probably is a post with a link, with the use of /PROFILE_ID/post with the link field filled. Hence, Daniel & Co shared a link.
That's why it doesn't look the same.
Some help for you to succeed at posting a photo:
How-To: Use the Graph API to Upload Photos to a user’s profile
Adding Photos to Stories
Disable grouping of photos on the timeline
Also note that you won't be able to post a photo with the link to image which is hosted on Facebook.