Embed Facebook Stream Filtered By Hashtags - facebook

I want to embed a stream of facebook posts onto a web page that is comprised of posts all around facebook containing a specific hash tag, but I'm not quite sure how to go about it. I had to do the same with twitter and instagram, but those were all fairly easy to accomplish. I'm just kind of looking for the best option right now, not so much on specifics. I've seen a couple of times the graph api for facebook as an option, but every time I see those they seem to be from a year ago, so not sure if it's out of date or if there is a better option out by now. Any recommendations on ways to go about it would be greatly appreciated.

See my answer here on how you can use the Search API for hashtags:
Need help on employing Graph Search parameters for hashtag query on facebook
Basically, you can call
https://graph.facebook.com/search?q=%23selfie&type=post&access_token={user_access_token}
Be aware that you have to use v1.0 of the Graph API, because in v2.0 searching for public posts will no longer be possible (https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_graph_api):
Public post search is no longer available.
(/search?type=post&q=foobar)
Graph API v1.0 will only be available until 30th of April, 2015.

Related

Searching through facebook posts based on keywords Facebook API

Can I go find a user's posts and comments based on a certain keyword?
No, there is no API for that.
What you can still search for via API, is pretty limited these days. https://developers.facebook.com/docs/graph-api/advanced/#searchtypes

Facebook API: Only displaying videos

I'm trying to scrape data from old Facebook posts from the New York Times for a research project, using the Facebook API. For recent dates this works fine, and I've been able to collect all the information I need. However, starting in around January the API begins to only provide me with their video posts.
The question then: How do I ensure that I see all of the posts, particularly given I don't really need the videos, at all. I am exclusively interested in the links.
For reference, this is what I'd like to see:
This is what I actually see:
and the address I use to generate these from the graph explorer: 5281959998/posts/?fields=type,created_time,link&limit=100&until=2017-01-15

Facebook Graph API insights

I'm new on working with Facebook and honestly I found it very confusing, terminology and documentation seems to be very ambiguous in many cases. Can somebody please help me out with a plain english explanation on how I can achive the following?
Post and image to Facebook (on the user page) and then check the stats (insights) of that post.
Till now I have managed to:
1) Create an app
2) Post the image on the user page with the desired message
I'm not able to understand how I can retrieve information about the particular image which was uploaded through my app. I want to know how many people have viewed that image, how many likes did it get, how many times it was re-shared.
Is it possible at all?
I'm posting to /photo not too /feed and I will like to keep it this way if it is possible.
Sorry if this was answered already but I spent a few hours trying to find an appropriate answer but wasn't able to get the right documentation.
UPDATE 1
After having a couple of days off from this topic and receiving the first 2 answers, I took another dive into this. Now I have tried the Graph API Explorer as suggested, and using the ID of a POST I can get some details about the POST, but the insights aren't showing anything, just next and previous.
My goal is to be able to gatther some stats about the pictures uploaded through the app. If this is not possible directly what should be the approach I need to take?
I don't believe a personal /photo has /insights attached to it - the Insights Object documentation page suggests that they do not - but you should be able to get likes, shares, and comments via the API.
It would appear FB has launched a redesign/reorganization of its documentation in the last couple of weeks, but the documentation for the /photo graph object is here -- you will need the user's Access Token, and the API endpoints you're looking for each have links to their own documentation pages there, including example code for each type of request.
Edit (summarizing discussion in comments):
There is no method via the Facebook API to gather insights for all photos posted to individual user timelines via an app. The app can gather likes, shares, and comments for each of those objects individually via API requests, and can make API requests for insights for photos posted to its own timeline. Neither of those options solves the intended use case here.
I'd recommend a solution that uses Sharing rather than an app integration, as this allows for better access to insights on the photos being shared. This is also a much simpler integration, and less brittle wrt future Platform changes. The main tradeoff is that the original photos being shared are expected to expire after a couple of months -- if this is unavoidable, I'd suggest implementing a redirect for requests for expired objects on the site.
We are able to get different kind of photos or picture Using Graph API
like as below:
1.Page Photos
Photos for a Facebook Page.A Page Access Token is required for all methods.Find here
2.Page Picture
Picture belonging to a Facebook Page. Find here
3.Photo
Represents an individual photo on Facebook. Find here
4.User Photos
Photos for a person.Find here
I hope it's helps you.

Facebook: collecting the specific posts

I have a simple question for Facebook developers. I would like to create website which would collect and embed some specific data from Facebook. For example, let's say I want facebook's posts or images with the most likes on a daily basis. Here's what I think:
Let's say there are x pages that I follow on Facebook. So at the beginning of each day or at some point I would like to loop through the posts of these pages and get the most popular posts/images.
Is this possible to embed to website? I am relatively newbie to facebook development.
I look forward to seeing your answers!
Kind Regards!
You can embed a specific post with https://developers.facebook.com/docs/plugins/embedded-posts. The specific nature of your question is not possible though.

How far back in time can you go with the Facebook API?

With the Facebook API are only recent things (wall posts, friends status updates etc) obtainable or is everything ever associated with the user's account obtainable?
That's a tricky question.
First nowhere in the official documentation says how many items you can get from Graph API nor FQL.
Not only this. Also when trying to do normal recently querys you may find out that not every result is returnes. Nor from the Graph API, FQL, not even from the FQL Test Console.
All this is because serious bugs in the Facebook Platform.
On october 15 Facebook said in its blog
We have received a great deal of feedback recently about things we should do to improve Facebook Platform. The themes are clear: “fix the bugs,” “update the documentation,” “talk to us more,” and “make things more reliable.” We are listening, and this post outlines some of the things we are doing to address your concerns.
This means that they are now fixing the bugs that has been accumulated on many months in Facebook Bug Tracker.
One of the open Bugs in there says:
When using a FQL Query or utilizing the new Graph API to grab posts on a users
stream, not all posts are returned.
From what I can see, the system will grab the latest posts from within the last
month, and then becomes extremely spotty after that. I am able to grab posts
from myself up to 4/24/2010, at which point every single wall post I have
posted seems to disappear.
Many other developers have states the same thing under the comments of this Bug.
On 2010-09-27 Jeff Bowen (Developer from facebook) said the following
Hi all, we still need to add this to the documentation but the stream table is
limited the last 30 days or 50 posts, whichever is greater. Sorry this wasn't
previously published.
This have made many people upset since they assumed you could get everything from the Graph API.
Anyway this is for multiple results. If you want a single result apperently (from the commnets in thts bug) You could go as far as June 15 2009
Personally, I haven't tested yet again so I don't know if this actully works the way they say. Facebook Graph API is in constant change. It has been incomplete and buggy since the begining. But now Facebook says they are working on that.
I recommend every facebook developer to sign up for the Facebook Platform bug tracking system since there is a lot of not official things about facebook, that will impact your applications.
I'll keep an eye on there to see if more is said on this topic and update this answer if needed