I need to post a photo already present in a page's Photo Album to the same page's Feed, in a way similar to the Share functionality - which means with the bigger display, and allowing me to geotarget the post.
I've tried several approaches (among others, simply specifying "type": "photo"), but somehow always end up with a Feed post "type": "link" rather than "type": "photo" as generated by Facebook when sharing a photo.
Any help would be greatly appreciated...
AFAIK, the only way to do that is to post to '/me/links' (instead of '/me/feed') and set the 'link' to 'http://www.facebook.com/photo.php?fbid=<id_of_the_photo>'. That will effectively share the photo in the user's feed, showing a bigger picture. You can add a personal message (using the 'message' field) but I don't think it's possible to geotag a shared photo.
Posting to '/me/feed' with 'type: photo' only works if the user is the owner of the photo (in that case, set 'object_id' to the photo id).
Related
I'm trying to get all posts from a facebook page for the last two years. Access token is my own which has manage_pages, publish_pages, show_page_list.
The posts are there, they're moderately old early 2016, but, graph doesn't bring them back these older ones. They were scheduled posts, visibility=everyone and of 'photo' type. Any query on {page}\feed, {page}\photos, or {page}\posts yields only a couple of posts.
Facebook Insights Screenshot
https://pasteboard.co/Hde6ZWU.png
Graph Explorer Output Screenshot
https://pasteboard.co/Hde7iDP.png
Does anyone know how to enumerate these posts with graph, or know of the reason why graph isn't reporting them using the get/feed and get/photos command?
These aren’t photos, they are posts.
1409847682673697/posts?since=2016-01-01&until=2016-02-01
shows the first post from your dashboard screenshot, “Andrew Smith - Malta”, just fine.
This is a share of a post onto your page only - the “original” is https://www.facebook.com/andrewmsmithart/photos/a.1533059820295875.1073741827.1533035286964995/1648921165376406/ But since that is not a photo uploaded by your page nor has your page tagged in it, naturally it doesn’t show when you request your page’s photos.
The object_id field of your page post refers the actual photo object.
When I look at the JSON data of a post which has several photos, I see that, this is done by using attachments/subattachments.
I want to post a data with several pictures and to do this, I want to take the advantage of attachments.
When I use "object_attachment" field for the post (to page feed), it creates only one attachment. Adding several "object_attachment" fields have no effect, only the first photo is used.
I want help on how to create attachment for a post and then add this attachment to the post.
Facebook says, attachments may be added to the posts to the post by "attachment_id" field.
Thanks to eveone who helps.
I've recently switch my code to post to facebook from
https://graph.facebook.com/[profile_id]/feed
to
https://graph.facebook.com/[profile_id]/links
Now i'm getting this problem, can anyone help?
- my picture that i accompany with the post is not showing, it look like facebook is defaulting to the first image it find on the link page
http://developers.facebook.com/docs/reference/api/post/
http://developers.facebook.com/docs/reference/api/link/
both of these document allow me to specify a picture, but somehow the "links" one isn't displaying the image.
Thanks in advance
Set correct Open Graph meta tags, especially og:image.
I just resolved similar issue, posted news on website and posted via /links to fanpage resolved in post with wrong image content and "site not found" title.
The issue was related to wrong code sequence. We hooked posting news via fb api in not-so-good place. The post should have been already available but it wasn't and posting to fb api results in immediate request from facebookexternalhit bot to check if it exists. Detailed log analysis shown that ping from facebook was before POST to add news finished, that's why we had messed content there.
Sample content we post, if what I described above is not your case:
content_dict =
{
'picture': 'http://www.czerwonysmok.pl/static/media/uploads/blog/pb_reddragon_all2_poprawiony_czerwony.jpg/',
'message': 'Title \n\n contentcontentcontentcontentcontentcontentcontentcontent ',
'link': 'http://www.czerwony-smok.pl/klub/aktualnosci/rashguard-ze-strony/'}
try:
logger.info("Publishing to facebook: " + str(content_dict))
graph.post(path="%s/links" % settings.FAN_PAGE_ID, **content_dict)
About sharing on my Android app i'm using this code:
Bundle postParams = new Bundle();
postParams.putString("message", "User's custom message above share content");
postParams.putString("name", "The name of the link attachment.");
postParams.putString("description", "The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.");
postParams.putString("caption","The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link.");
postParams.putString("picture","The URL of a picture attached to this post. The picture must be at least 200px by 200px. See our documentation on sharing best practices for more information on sizes.");
postParams.putString("link", "The link attached to this post");
Refer to the document for detail: https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.3
I checked through the api's but I may have missed it, if it exists... I can't find a write/modify api call to change move a photo from one user album to another (such as can be done via FB's web interface by editing the album and use the pull down for each image to move them one by one.
Essentially I just want to modify for an image the enclosing album id. I don't want to download from one album and upload to another as I want all the tags and comments to remain intact (as well as the photo's id)....
My goal is to create a simple app to be able to move all (or a selection) of photos from one album to another, ie. "merge albums" since FB's web interface does not have that functionality. I have a ton of albums I created in 2009 when the limit was 60 photos per album so now that the limit is 200 I want to reduce my album count by over 67%...
There is no API to remove photos, so effectively all you can do via the API is copy, you'd then have to remove the extraneous albums manually using Facebook's web interface
I'm creating an Application to upload photos to an album on a Fan Page.
This all seams to work as long as I'm the administrator for that Fan Page using the "manage_pages" permissions... but whenever I try to upload it as a "regular" user it fails because the user doesn't have the administrator rights (which of course makes perfectly sense).
I just can't seem to find a solution to solve my problem and to allow people to upload photos to the Fan Page's Album without becoming an fan-page administrator.
I really hope someone can help me since I've been struggling a few days trying to get this to work.
Cheers, Dwight
Non-Admins are not allowed to post to a fan page's album. They can post a picture to the page's feed. The page's feed album is different than the admin album. I tested this out last week for a similar question asked on S/O.