Get access to photos' tags on Facebook with Graph API - facebook

It's possible to get access for tags on friends' photo from facebook app? Lets assume I have friends_photos permission.
edit:
If yes, how to do it using Graph API? How would I know on which photo is tag I have got from Graph API?

FQL the photo_tag table.
You can graph FQL with:https://api.facebook.com/method/fql.query?query=QUERY
Read more on documentation.

Yes,
take a look at:
photos.getTags // Returns the set of user tags for all photos specified.
more at:
http://developers.facebook.com/docs/reference/rest/photos.getTags/

Related

Any way to pull likes by dates from facebook graph api? (New Likes instaed of Global Likes)

I basically need an access to a fanpage's likes by dates, i mean.. not the global likes when you access the graph but the ability to see how much likes the page got yesterday/today..
Any way to do that?
Have a look at https://developers.facebook.com/docs/reference/fql/insights/#page_users - you (by which I mean the user of your app) need to be admin of the page though. You get page_fans, *_adds, *_removes, etc.. On how to execute FQL using the Graph API: https://developers.facebook.com/docs/reference/fql/

Facebook Phot uploading PHPSDK

uploading photos to a wall, i can use the items below, I am using the solution on this: Facebook graph API & PHP SDK questions
What I need to know is checking for its location once its uploaded... will that be stored in $fb_foto as shown in the link above...
Cheers
Phil
In that example $fb_foto will contain the photo ID after upload, you can then access it at /{photo id} in the Graph API

Using the Facebook Graph API how can find the most liked photo in an album on one of my pages?

Using the Facebook Graph API how can find the most liked photo in an album on one of my pages?
I have access to the page insights if that can be used.
There are 200 photos in each album so I don't want to do an api request for each photo.
Subsequently you may also find the most commented on.
Here is the code you request:
http://fivespot.me/fblikes.php
$likes = $facebook->api('/'.$picId.'/likes');
However if you are looking to just find out the most liked there is an app already compiled that will do this for you:
http://apps.facebook.com/imanpic/
The Graph API doesnt support querying for an arbitrary set of photos with some criteria. BUT - you can access the Likes object for each Album, which returns a data set representing all the Liked Photos in that Album. You could then just walk that data set and count the number of times you see the same photo Like.
Thus - you just need to issue a Graph API call for Likes sub-object of an Album.
See "Likes" under "Connections" at:
http://developers.facebook.com/docs/reference/api/album/

Number of likes for a photo or album thru the API

Is it possible to get the number of likes for a photo or album using facebook's API?
This is a link to the open graph for an album
http://graph.facebook.com/99394368305
but it doesn't have the number of likes.
on facebook, you can see it has 2475+ likes
http://www.facebook.com/media/set/?set=a.99394368305.88399.40796308305
thanks
To get the likes for a photo is easy, as you can see in the API Reference:
http://developers.facebook.com/tools/explorer/?method=GET&path=20531316728
For an album you can use the likes connection to get all members who liked that album. So, in your case:
http://graph.facebook.com/99394368305/likes
Notice that that won't return the count. You have to manually go through the results and count the likes. So you should definitely cache the results!
Try to use something like this as the URL to fetch what you need:
https://graph.facebook.com/albumID/photos?fields=id,likes.summary(true),comments.summary(true)&access_token=XXXXXX
Here is a post that explains how in detail.

What is the API for Facebook 'profile stream' aka wall posts?

Is there an API call, and if so, which call to get the 'posts to my wall from myself and others' on Facebook? It seems like it could be filtered out of the Facebook stream API, but it's not clear how that works to me.
This link seems to imply it's possible:
http://developers.facebook.com/news.php?blog=1&story=225
You want to do an FQL query like this:
SELECT actor_id, message FROM stream WHERE source_id = <user id> limit 50
You will probably want to select a few more fields, you can see what is available here: http://wiki.developers.facebook.com/index.php/Stream_%28FQL%29
Here it is.
Profile feed (Wall): https://graph.facebook.com/me/feed?access_token=...
https://developers.facebook.com/blog/post/465
You can publish stories to people who like your Open Graph Page the same way you write a Facebook post from your own wall. The stories appear in the News Feeds of people who have clicked the Like button on the Open Graph Page.
You can also publish using our API. If you associate your Open Graph Page with a Facebook app using the fb:app_id meta tag, you can publish updates to the users who have liked your pages via the Graph API.
First you need to get an access token for your app.
Check out the blog post, it covers everything you need.