Is there a way to get a Photo's album ID from Facebook Graph API's news Feed.
This previous SO post:
Facebook Graph API - get a photos album ID
suggested using the FQL table, but my application currently only uses the Graph API and I would like as much as possible for it to remain that way. But it seems even if I do another query about the photo itself I still get no album information.
Thanks a lot,
Related
I want to retrieve good quality album photos from graph API. but when i send get request of albums data, they provide me only 130*130 resolution photos. so! how can i get full size photos from graph API?
my graph API URL : https://graph.facebook.com/me?fields=albums{photos{picture,id}}&access_token=my_token
"picture": "https://scontent.xx.fbcdn.net/v/t1.0-0/q82/s130x130"
I have an application that pulls in content from both Facebook and Instagram, but users frequently cross-post the same photo. Using the Facebook Graph API, I'm trying to find a way to determine if any given photo was posted via Instagram.
I'm confident that this data exists, but I don't know how to access it via the API. Looking at one of my own cross-posted photos, I know Facebook at least has the data:
Have a look at the similar questions
How to get Likes of Instagram photo posts in Facebook Graph API?
Posts from Instagram not showing up on Facebook Open Graph API
And the bug report at FB: https://developers.facebook.com/bugs/110563582419837/
You could query the "Instagram Photos" album with FQL:
select pid, images from photo where album_object_id in (select object_id from album where owner = me() and name='Instagram Photos')
There were two solutions.
We only were asking for user_photo and user_status permissions. If we had asked for read_stream, we could have looked at the /me/posts endpoint, which offers the application field. We might do this, but the permissions could be confusing for users since it also allows us to read their newsfeed. Ideally, there'd be a user_posts permission that just gave us access to everything the user posts, but nothing posted by their friends.
Every Instagram photo shared is put into the same Facebook album. So, we just check to see if a photo is put in that album and disregard it if they've also authenticated with Instagram in our application. It feels less reliable, but it works.
I have been using Facebook graph Api, for a long time, in my website to allow users to grab their photos and use in mine.
A few days ago, I noticed that the following code:
$facebook->api('ALBUM_ID/photos?limit=0')
is no longer retrieving the photos of the given album.
Has facebook changed it's API?
thanks.
From the roadmap:
FQL and Graph API limit=0 change
Currently, we have a bug where limit=0 returns all results. After the migration period, specifying a limit of 0 in FQL or the Graph API
will return zero results.
I am developing a greeting card application. Greeting card should be posted to multiple friends' wall. I had used graph API to upload picture to friend's wall using [friends_Id]/photos post. Using this approach Facebook will create an album in to that user account automatically rather than creating or sharing photo to friends. After photo upload this newly created album will be shared to friends. This is not the option which I'm looking.
Facebook will use the same album for other photo uploads. Since album was shared to some friends, all previously shared friends will get notifications on their news feed for this new photo upload. So I omitted this approach.
Second I used posting image link to friend's feed. This time Facebook won't allow me to post image links with hosted on their server saying that FCDN images are not allowed in stream.
Hosting a server will be an expensive option for me.
Third I used photo tagging approach. This work well. But this is not the required option.
In Facebook website there is an option to share a photo in an album to my friends wall. Can I implement this approach using graph API? Is there any option to share an uploaded image to friend's wall using graph API?
I hope that my question is clear to you... Please help.. :)
Perhaps this approach will work you. See https://developers.facebook.com/blog/post/526/ where you can post to a wall and refer to an existing photo, or basically attach a photo you own to a friend's wall. So here are the steps:
1) Upload the photo you are interested in sharing to your album. Note the photo ID.
2) Send an HTTP POST to https://graph.facebook.com/[FRIEND_ID]/feed with the object_attachment parameter set to your photo ID.
Please note that you will need an access token with publish_stream permission.
I'm doing a FB app where users are able to upload a photo to a photo album that is created at the same time. My problem is that I only want the photos to go into the album avoiding the post of the same photos on the users wall and in the users news feed.
Not sure if that's possible or if there's a workaround.
Thanks for your help
You just need to use the parameter no_story=1 within your call.
This is not documented on Album or Photo, but is on User and it works for Photos as well.
Related to: facebook upload photo without news feed post? Possible?
The only way to work around this is to delete the stories (posts) generated for each photo upload. To answer another question in the thread you can do batch photo uploads, see this blog post https://developers.facebook.com/blog/post/493 that explains how to do this using Batch Requests.
Assuming you used batch requests (or even if you upload one at a time) you can follow this process:
After uploading the photos through Graph API, note the id of the photo(s) uploaded.
Make a call to https://graph.facebook.com/me/feed?fields=object_id&access_token=youruseraccesstoken to get your latest wall post information. You may choose to pass on a limit parameter so you do not get too many results.
Loop through the results, looking to match the object_id to the information saved in step (1). Note the corresponding id, these are the wall post id(s).
For each wall post id found in step (3) issue an HTTP DELETE to https://graph.facebook.com/POST_ID with an access_token that has publish_stream access.
The wall posts should be gone but the photos still in the album.