facebook user profiles by likes - facebook

I have a "Like"-object data from facebook:
{
"name": "24",
"category": "Tv show",
"id": "14176232250",
"created_time": "2010-10-29T17:46:27+0000"
}
it's possible to get all users, which have that "object" in their "likes"?

It is not possible to retrieve information on users who like a page via either the Graph API or FQL.
See this previous question: Retrieve Facebook Fan Names

Related

Can't get categories on Likes on new FB graph API (2.5)

I am using this URL to access facebook likes off of an authorized and logged in user:
https://graph.facebook.com/v2.3/me/likes?access_token=accessToken
it returns this
"data": [
{
"name": "Page Name",
"category": "Category name",
"id": "12345678",
"created_time": "2012-03-26T08:02:01+0000"
},
However on my new app which uses API 2.5
https://graph.facebook.com/v2.5/me/likes?access_token=accessToken
it returns this
"data": [
{
"name": "Page Name",
"id": "12345678",
"created_time": "2012-03-26T08:02:01+0000"
},
Which is minus the category name.
I have my new app registered in FB and it will not allow me change API from 2.5, and even on my new app if I use the 2.3 URL it will still not display categories.
Does anyone know what extra calls I need to make to get categories or why they have disapeared in newer versions of the API, I can't find anything on google or on FB's doco's
It´s called "Declarative Fields", check out the changelog for v2.4: https://developers.facebook.com/docs/apps/changelog#v2_4
That´s what you need to change:
/me/likes?fields=name,category&access_token=accessToken

Find Facebook UID of Social Graph Search Results

I am trying to get the Facebook UID's of results returned from a Social Graph search. For example, lets say I were to search "People who like surfing and live in Florida" I would then want to grab the Facebook UIDs of all of these search results.
I can do this one at a time by opening each person's profile and entering their profiles URL into a site like findmyfacebookid.com.
I am just hoping there is a quicker way to do this. Does anyone have any ideas on where I might start? Thank you all!
For getting userid's you may use graph API calls.There isnt any need for an external website.
Use this API request,
http://graph.facebook.com/{USERNAME} OR {USERID}
Eg: http://graph.facebook.com/mark
And you will get a result set of basic profile parameters in a JSON format.
{
"id": "4",
"name": "Mark Zuckerberg",
"first_name": "Mark",
"last_name": "Zuckerberg",
"link": "http://www.facebook.com/zuck",
"username": "zuck",
"gender": "male",
"locale": "en_US"
}

Can I aggregate Facebook Likes, Tweets, and Google Pluses?

I'm building a voting application on my new website, cabinethardware.org. I'd like the voting to be done in such a way that when someone votes for a project (to receive a $1000 rebuilding grant) that they are encouraged to plug the project via social networks. My programmer has had difficulty with the application, and it occurred to me that one way of doing it is to just put like, tweet and G+ buttons on the site and add them together. So if a project gets 24 likes, 12 tweets, and 18 G+, it would have 64 votes. It doesn't bother me if someone votes on all three engines.
Before a project is eligible for a grant, it must receive 100 votes. My question is, is there a way that I can aggregate the likes, tweets, and G+ so that I can see on the backend how many votes each project has, without going to each project and adding them up by hand? Also, I'd like to display to customers the combined total.
Does anyone know of a way to combine the count of these three?
For Google+, you would only need to perform one API call to the Google+ APIs that would be searching the Google+ public data. Searching the Google+ public data is demonstrated in the API explorer.
The post response contains information about reshares and +1s:
"verb": "post",
"object": {
"objectType": "note",
"content": "Setting up a server-side flow project that accesses Google+ data using the .NET stack can be a little tricky, I walk you through it in this blog post.",
"url": "https://plus.google.com/109716647623830091721/posts/g8LjdGAXdDc",
"replies": {
"totalItems": 0,
"selfLink": "https://www.googleapis.com/plus/v1/activities/z125srm50lf1slxrd04cfftatqyoglnoqio/comments"
},
"plusoners": {
"totalItems": 6,
"selfLink": "https://www.googleapis.com/plus/v1/activities/z125srm50lf1slxrd04cfftatqyoglnoqio/people/plusoners"
},
"resharers": {
"totalItems": 0,
"selfLink": "https://www.googleapis.com/plus/v1/activities/z125srm50lf1slxrd04cfftatqyoglnoqio/people/resharers"
},
For Facebook, you can use the Pages API to count likes for your page, you can experiment with this in their API explorer.
The following data shows their response data:
{
"about": "Build and distribute amazing social apps on Facebook. https://developers.facebook.com/ ",
"company_overview": "Facebook Platform enables anyone to build social apps on Facebook, mobile, and the web.\n\n",
"is_published": true,
"talking_about_count": 39241,
"username": "FacebookDevelopers",
"website": "http://developers.facebook.com",
"were_here_count": 0,
"category": "Product/service",
"id": "19292868552",
"name": "Facebook Developers",
"link": "https://www.facebook.com/FacebookDevelopers",
"likes": 952596,
"cover": {
"cover_id": "10151121467948553",
"source": "https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-ash4/s720x720/299374_10151121467948553_45631061_n.png",
"offset_y": 0
}
}
Likes are just a member in the response data.
For twitter, you can query for mentions of a user with their search API and passing a search string for the user as #user. A count of the objects within results is going to be your mention count. The response data is a little too much to paste in here but here's an example query using their API.

View post photo from friends using facebook graph api

I want to make my app to become less boring, one way to do it is by showing post photos from friends on the home tab. I manage to do some of it by using graph api.
I am using this graph to view my friend activities
https://graph.facebook.com/me/home?limit=25&access_token=erqaer
result:
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/157108_525475649_53898163_q.jpg",
"link": "http://www.facebook.com/sample",
"type": "link",
I get to get this photo by getting the picture data, but on post photos I can't.
Post Photos
using the same graph above,
result:
"link": "http://www.facebook.com/photo.php?fbid=12234444",
"icon": "http://static.ak.fbcdn.net/rsrc.php/v1/yz/r/StEh3RhPvjk.gif",
"actions": [
{
"name": "Comment",
"link": "http://www.facebook.com/23434352/posts/12143343434"
},
{
"name": "Like",
"link": "http://www.facebook.com/121214334/posts/34343434344"
}
],
"type": "photo",
"object_id": "357309684280810",
I only get this data. There's no picture data that I can get to view post photos.
You can use the Graph API Explorer to experiment with Facebook's API. When you query :
htttps://graph.facebook.com/POST_ID you should get back all the information from that post.

Scope of Facebook API

I am trying to learn and create a Facebook API on the go. However, I haven't found any page on the developer pages that specifies the scope of the Facebook API in great detail. I understand public information can be accessed using Graph API. But at the same time understand that further access is possible, not sure how much though.
Is there anyway to access the 'Edit news feed options' of a user that authorizes an application?
I don't really understand what you mean by "scope", but the Graph API is not more than a series of URLs to contact the facebook servers with queries and obtain answers in form of JSON objects.
You can start learning by looking at the reference for the API here:
http://developers.facebook.com/docs/reference/api/
There are unofficial APIs for every language you can imagine, for example java: http://code.google.com/p/facebook-java-api/ , c#: http://facebooksdk.codeplex.com/ , etc.
To read the news feed, you can access it by:
https://graph.facebook.com/me/home?access_token=TOKEN (where TOKEN is the access token)
Fb will respond with a JSON object similar to the one pasted below.
{
"data": [
{
"id": "11111_1111111111,
"from": {
"name": "Name",
"id": "11111111"
},
"message": "SOME_MESSAGE",
"actions": [
{
"name": "Comment",
"link": "http://www.facebook.com/111111/posts/11111"
},
{
"name": "Like",
"link": "http://www.facebook.com/11111/posts/11111"
}
],
"type": "status",
"created_time": "2011-04-20T20:19:04+0000",
"updated_time": "2011-04-20T20:19:04+0000"
},
etc etc etc
],
"paging": {
"previous": "https://graph.facebook.com/me/home?access_token=TOKEN",
"next": "https://graph.facebook.com/me/home?access_token=TOKEN"
}
}
Having that, you can use the ID for the person or the message to perform new queries, as explained in the FB API page:
All of the objects in the Facebook
social graph are connected to each
other via relationships. Bret Taylor
is a fan of the Coca-Cola page, and
Bret Taylor and Arjun Banker are
friends. We call those relationships
connections in our API. You can
examine the connections between
objects using the URL structure
https://graph.facebook.com/ID/CONNECTION_TYPE.
The connections supported for people
and pages include:
Almost every information on FB is accessible through the Graph API, provided the user authorized the app with the rigth permissions:
http://developers.facebook.com/docs/authentication/permissions/