facebook fanpage geotaggig map - facebook

Is there a way to have a map on my facebook fanpage with geotaggs from my photos similar with instagram map ??
I have a lots of pictures and i”ve put on everyone location so it would be nice to find a way to display my route on a map.
10x

I'm not going to provide full code for you to do this, but if you are prepared to put a little bit of code together, this should be pretty simple:
Get a list of photos from your Page. You can do this via Graph API with either the /pageid/photos or /pageid/tagged/ connections. You will of course require an access token in order to request this information.
This will give you a list of Photo IDs, so you should now iterate through these IDs one by one (or using Batch Graph API requests) and request the Graph API object for each Photo ID. In each object will be a place field (if the location has been tagged, and if the user whose access token you are using is able to view the photo) which contains a Place ID.
For each of those Place IDs, there may be (some Places lack this) a location field which will contain a latitude and a longitude.
Use these Geo-points with an API for Google, Bing or some other mapping software to create an HTML page with a map filled with markers that highlight each of the photos.
Use this HTML page as your Page Tab URL for a Facebook app and then follow these instructions to add this as a tab to your Facebook Page.
Done.

Related

Facebook Watch Episodes API

Are there any Facebook APIs to retrieve the episodes of a show from Facebook Watch?
E.G. Get all the series and episodes in those series of https://www.facebook.com/sacredliesshow/
The closest I can find is https://developers.facebook.com/docs/graph-api/reference/video-list/#Reading but it's not clear how I should deduce the {video-list-id} from the page https://www.facebook.com/sacredliesshow/
Thanks
You should be able to get all video lists (including their IDs and names) for a page (based on ID) from here: https://developers.facebook.com/docs/graph-api/reference/page/video_lists/
That specific page's ID seems to be "454309158359123" (Extracted from the page's header section). However, given that the endpoint mentioned above is private I don't think you'll be able to use this if you don't actually own the page or have login access to it. Probably also why you can't just get the ID of video lists from their website by inspecting the source.

Facebook Graph API - Get list of id's and names that have liked a post

Using the Facebook Graph API, how do I get the list of people who have liked a specific item (say a post)? Doing a call like /ITEM_ID/?fields=likes using the Graph Explorer I'm able to see a list of names in the [data] array, but, when I call it from a website it doesn't display the names, it just shows the count value.
I'm thinking it's one of two things, but I'm not sure:
I'm using the wrong access token. I'm using the extended one for the fan page the post is on.
Facebook just doesn't give out that info to someone (or a fan page) that isn't the owner of the original post. (I'm the one who made the post.)
Is there a way to get the list of user names and user id's that have liked a post, and if so, what's required to do so?
There could be 2 reasons-
You access token is not correct. You need the read_stream permission for getting the posts.
You are not parsing the resulted JSON correctly.
/ITEM_ID?fields=likes.fields(id,name)
i have done this like this ( me/feed?fields=likes.fields(id,name) ) and it works

Show tagged images from facebook on website?

I am trying to achieve similar functionality to the one shown here...http://blackmilkclothing.com/collections/leggings/products/circuit-board-grey-leggings
there fan page https://www.facebook.com/blackmilkclothing allows people to hash tag a photo and then populate it on their website like the link above.
Loading a series of tagged images from my facebook fan page to my website. I am not positive how this is acheived? I am assuming some kind of api process but any help in the right direction would be appreciated.
Thanks! All help is appreciated
See the 'tagged' connection of a Page in the Graph API: https://developers.facebook.com/docs/reference/api/page/
It returns a list of objects the page is tagged in, including photos
If you need background knowledge I suggest these links in particular:
Graph API overview: https://developers.facebook.com/docs/reference/api/
Page login: https://developers.facebook.com/docs/authentication/pages/
After a good bit of trial and error I've found the most efficient way to query photos tagged to a particular Facebook page is to use Facebook's FQL interface to retrieve a list of stream posts.
With FQL you can limit the queried objects to only those posts containing images (unlike with the higher-level Graph API calls which will return all posts, many of which may not have associated photos), and you'll also have more granular control over composition of the result set.
Keep in mind that Facebook doesn't have true hashtag support (only Facebook pages can be tagged), so to simulate the hashtag support that Black Milk Clothing encourages, you'll need to parse and filter the photo message text yourself.
As an alternative quick and easy solution, I've rolled the results of my efforts into a free online service called TagTray -- with TagTray I've added an interface for building and curating hashtag based galleries from Facebook, Instagram, and TwitPic (including application-level Facebook hashtag filtering) that can be framelessly embedded into a site with a few lines of JavaScript.

Adding Facebook Photo objects to Open Graph Action

I've created a timeline app that adds events to user's timelines in the past. I've noticed its simple to add tags, places, and external images to OG objects and actions.
However, I can't seem to find a good way to connect to a facebook photo (i.e. a photo from the user's albums). Adding a link to the photo's picture in the images field doesn't work the expected way without an access token (which will presumably expire)
For example: /namespace:action?image=http://graph.facebook.com/10100111692798728/picture will show a '?' photo (in aggregations and elsewhere) unless you pass a valid access token in too (that can't work permanently). This is presumably because whatever identity is going out to request the photo is not allowed to access it this way.
It doesn't seem like you can connect your own actions to photo objects either. Is there a solution to this that I've missed. I'd really like user's to be able to add a photo from their facebook albums to an action from my app (i.e. them doing the 'action'). It would be nice if you didn't have to point directly at an image on FB's CDN somewhere, it would be even nicer if there was a way to point directly at the FB open graph object.
Thanks,
Grant
It is possible to connect the action with Facebook photo like this:
POST /me/do:action?object=[objectId]&access_token=[valid access token]
If the [objectId] is an object id of existing photo - it will show the picture and correct link to the full size facebook photo on timeline.

Any way to query either ALL Facebook Pages or the TOP 20% (by likes) using Graph API or FQL?

I want to build my own list of the most 'liked' pages on Facebook. FB itself appears to do a version of this, at least for each letter of the alphabet. Each directory page, such as http://www.facebook.com/directory/pages/A lists the top 20 most liked pages starting with that letter.
If I knew the IDs of every FB page then I could easily grab its like count using the graph API, but I don't know of a way to get that initial list. I'm sure it's huge, and honestly, I really would rather just have the top 20% or so of all pages. But if I had them all I could do the sorting myself.
I've searched the FB dev forums and looked through their docs but can't find a way. Queries using FQL don't appear to take wildcards either.
In FQL, you can search the page table by name. This doesn't allow wildcard searches though. Using the graph api, you can perform page searches using this url:
https://graph.facebook.com/search?type=page&q=test (You would want to future proof this by adding an access_token parameter to the end). A third option would by to use search engines to search for Facebook pages. Finally, you could scrape and parse the Facebook page browser by using this url.