What I Want
I need to create the posts on a page wall with a big preview pictures - like the ones that are displayed when you upload a photo. It will make sense to add those photos to the "Timeline Photos" album of a user (or page) using the Facebook Graph API.
Sure I can poll the users albums list and search for a type:"wall" one (i.e. the Timeline Photos in the English translation), but what if the album does not exist? How do I create one or how do I make Facebook Graph create it?
What Have I Tried
Tried posting to /me/feed with a message and a picture URL (params picture or source), but all it does is just create a type:"link" post with a small picture, while what I need is a type:"photo" one.
Once again, I need that because of the big photo that gets displayed on a wall if post is a photo. For instance, that happens when I upload a picture to the album that gets automatically created for my application. But the issue is that when there are several photos posted one after another, Facebook automatically groups them in a set that belongs to an album.
P.S.
Basically, what I want to achieve is having an ability to send the posts to a page wall with big preview photos on the wall itself that are not grouped by an album name.
Please help. Thanks
Solved by posting a photo to /{page-id}/photos.
https://developers.facebook.com/docs/graph-api/reference/v2.0/page/photos
Related
I wrote a php script that gets random articles from my DB and display it on my Facebook page using the graph API, I was about to do the same with the images that I want to post but I noticed that it won't be efficient because getting the images in random will mean that the same image might be uploaded more than once in more than one occasion
The efficient way would be uploading all the images to a Facebook album instead of the DB and then use the graph API to post the images from the album the problem now is that I can't figure how to do so.
You can move the images you have already uploaded,
otherwise, mark the rows you've already uploaded to facebook and exclude these rows from your select query.
I am using the following code to share images on facebook but when the dialog box is shown it does not show the image and once it is uploaded facebook just shows a link to image.
<a name="share" type="button" href="https://www.facebook.com/sharer.php?u=www.example.com/myimage" target="_blank">share</a>
This should work like this
<a href="http://www.facebook.com/sharer.php?s=100&p[title]=Our Site Title&p[url]=http://us.oursite.com/default.aspx&p[images][0]=http://www.history.malc.eu/globe.jpg&p[summary]=Our facebook description that is used on the FB share page." target="_blank">
Share this
</a>
EXAMPLE
Use the Facebook debug tool to see how Facebook processes the URL you're sharing.
The Facebook scraper will look for OpenGraph meta tags. You can reference the image you want as a thumbnail with the og:image and og:image:secure_url
Alternatively, if you wanted to upload the image to Facebook so that it goes into the user's album, you should check out How-To: Use the Graph API to Upload Photos to a User's Profile
To be more clear, you should not be sharing a link directly to the image, but rather to a page which has OpenGraph meta tags, one of which should link to the image.
Facebook doesn't support sharing of plain images, only hyperlinks can be shared. Try posting the same image's link on your profile as status. Facebook won't show you any thumbnail for it but just the link. To share a image on facebook, you have to somehow upload it -_-
From the social plugins docs the share initiates a callback from Facebook to the page you want to share. To affect what that shows you would have a page with meta tags (og:image, og:title and og:description) to affect what Facebook puts in the comment on the users timeline.
To show the image, you'd probably need a hosting 'page' that uses a thumbnail of your image in its meta data so that it appears in the users timeline correctly.
Facebook then polls this periodically. This is very similar to the like mechanism.
Make sure you use dont click on share more than once, after that you cant see additional changed you made for next 24 hours
I am working on a Facebook app that uploads a video to your Facebook Timeline. I would like to be able to tag the user's friends in the video, since I am processing the video to include their profile pictures. There are never more than 4 friends, and they appear in the video, so that shouldn't be violating any spam rules.
Is there a way to automatically tag the people in this video? I am uploading the the /videos endpoint using Curl in PHP, and getting the video id back as a response, and attempting to POST to /video_id/tags to tag users, but it isn't working. Is there a way to handle this?
Thanks,
Esa
Right, seems it is not possible to tag an uploaded video by POSTing to https://graph-video.facebook.com/me/videos (either when the video is uploaded with tags= or tags[]=, or after the video has been uploaded).
As a workaround, you could think about using an Open Graph action and tagging the action. For example, "Esa uploaded a video" and add tags for Esa's friends. This would also give you OG Aggregation stories in the user's timeline.
Info on tagging an OG action:
https://developers.facebook.com/docs/opengraph/actions/#taggingpeople
I want to post into community wall post with attached image. If I use simple api call to /page/feed with picture arguments it inserts a small image. But I want to attach big image, for example, from gallery. When I upload photo to gallery it automatically posts to wall. But when I post >= 3 photos all that posts are merged into single one with all inserted images.
The question is how to get different post for each uploaded image? Or maybe I can attach to /page/feed api not picture only, but image which would be uploaded into album?
Thanks
When you say "attach big image", I assume you are POSTing to /PAGE_ID/photos, right?
If you upload 3 or more images, yes, they will be collapsed when they are displayed in the page's feed. This is a "feature" of feed that organizes and collapses images that were uploaded together.
Imagine if you uploaded 20 photos to the page and they weren't collapsed; the feed would be dominated by the photos and it would be hard to see any other content (like content that was published slightly before the uploaded photos).
If you can provide a screenshot of what you are seeing, I can confirm this.
And yes /PAGE_ID/feed with picture is a thumbnail for a post. Example: a thumbnail to accompany a post containing a paragraph of text (or a link).
https://developers.facebook.com/docs/reference/api/page/
I am working on new video website, and I want to make social plugins below every video. If the user wants, he will click the like button and the video picture and its description will appear on the user wall. But I have a problem- It does appear on his wall, but not on friends newsfeed.
I have seen couple of websites doing same thing with social plugins and they got it wokring to appear on friends newsfeed.
What do I need to do in order to make that working properly? Is my website need to be added manually to "approved" websites or somthing similer?
Thanks.
Did you already got the OpenGraph meta tags? You can get your customized Facebook Plugins code and meta tags on http://developers.facebook.com/docs/reference/plugins/like/
Good luck!