I work with Facebook API SDK. I'm trying to get all public photos using https://graph.facebook.com/search?access_token=xxxx|xxxxx&q=%23hashtag&type=post
But I have a problem: result contains only shared photos in first account. When i'm posting photo without share, search not found it.
Otherwise, I have another account where I'm posted photo and share it, but photo is not found too.
Who knows, how can I get all public photos with hastag using FQL or graph search
Addition:
Few days ago - facebook search is not working
After discussing with facebook developers, I got the answer:
Facebook API does not support searching for hashtags.
%23 is just the URL encoded version of a # which gets decoded on a
server generally so it still won't work. For example if I wanted to
search for #YOLO I would just say q=YOLO with no # or it's URL encoded
form.
It's just something that the api doesn't support at the moment
Facebook has officially deprecated the post search type. Im not sure when exactly but I can tell you I tried today (10/15/2014) and its a no go.
Related
Is there a possible way where I can retrieve a list (with thumbnails) of my latest videos from youtube, store the embed code in a database using a cron job so I can show the video on a separate page instead of leading the users to youtube to view the videos? (all in php)
you can try to have a look at this page: https://developers.google.com/youtube/v3/
Google writes that:
You can use the API to fetch search results and to retrieve, insert, update, and delete resources like videos or playlists.
I saw thath PHP API are still in beta version but you can try it out. You must register your application to obtain credential to use API. At developers.google there is a lot of documentation and some examples (https://developers.google.com/youtube/v3/code_samples/php#retrieve_my_uploads)
Using API you don't need to retrieve code and store it into database, you can just show videos directly in your web application. I hope this is what you was looking for let me know if it helps!
Luca
I am trying to find in Facebook API if they provide the HashTag search.
I meant I search in Facebook Query language and searched in Facebook Tool Explorer.
Any Idea ?
Since April 30th and the introduction of Facebook api v2.0, public Post search is no longer available and will return :
{
"error": {
"message": "(#11) Post search has been deprecated",
"type": "OAuthException",
"code": 11
}
}
According to Facebook changelog v1.0 will continue to work until April 30th, 2015. As the search endpoint is back in the v2 doc, there is hope that they will reconsider the deprecation.
The search endpoint is a fulltext search, you just have to encode the hash (%23) and run your query through it :
Facebook API explorer :
You have to select v1.0 or Unversioned in the API version selector (on the top right)
https://graph.facebook.com/search?type=post&q=%23the_hash_tag
Curl or whatever :
Just remove /v2.0/ from the url and call the unversioned API
https://graph.facebook.com/search?access_token=YOUR_TOKEN&type=post&q=%23the_hash_tag
There is currently no API for the hashtags feature on Facebook
There is a posts search function which will return some posts with a certain hashtag if you use that hashtag as the search string. But it will ignore the # tag.
There is a comment on one of the sites which says "you can change the # with the hex value from the ascii table (%23) to search for hashtags. but it will only find tags, created by the facebook homepage or official facebook applications." Not sure how valid, you could try it
like this https://graph.facebook.com/search?q=%23myhashtag
https://graph.facebook.com/search?q=%23myhashtag
There is no hashtag API available for Facebook and using %23 for #(hash) is the only solution as of now which already everyone here has commented upon.
I'm not too sure about FQL being deprecated in near future as I could see different opinions across the board.
As I am understanding you would use Keyword Insights API
Though as mentioned on the following link
Access to the Keyword Insights API is restricted to a limited set of
media publishers and usage requires prior approval by Facebook. You
cannot apply to use the API at this time.
https://developers.facebook.com/docs/keyword_insights/
Take note on the mention of hashtag searching in the "best practices" section.
I'm building a small web game which involves the player pulling down 6 public images from Instagram in relation to a tag.
I don't want the player to have to log into Instagram in order to play.
The Instagram API documentation seems to be leaning heavily towards a user log in.
I found an Instagram class on GitHub (linked below) which is the closest thing to what I'm looking for that I've found. However it is mostly for a user login, it does have bits for public access.
https://github.com/galen/PHP-Instagram-API
I've got the Instagram Object but I can't use it
I'm new to all API so the answer may be obvious.
Sites Pulling in Public images
http://searchinstagram.com/
http://london-now.jit.su/
Question ?
Could someone show me a way of pulling down images from Instagram related to a tag, using PHP?
I have a jQuery plugin - https://github.com/rickydazla/Hashtagagram
I've found this url, not in Instagram's documentation, but it's very similar to the "oficial" url:
https://api.instagram.com/v1/tags/edinburgh/media/recent?client_id=CLIENT_ID&callback=CALLBACK_URL,
where CLIENT_ID and CALLBACK_URL have been defined when you have created your aplication.
I've been sarching for hours on FB graph api docs and google but couldn't find a solution. Let me explain my question. Using the FB graph API, we are able to retrieve user's newsfeeds, but how do we retrieve user's newsfeeds that are posted by FB apps, such as game scores/achievements? I know that it's possible to retrieve user's newsfeeds created by a specific app by adding filter=app_[app_id], but is there a way to filter newsfeeds that are created by any apps?
Currently what I do is that, if a newsfeed contains a link that links to app.facebook.com, I assume it's posted by an FB app. I'm not sure if this assumption is safe and is there a better way to achieve my goal?
P.S. I use php SDK so a php solution is highly appreciated. Solutions using other SDK are also appreciated. I'll try to make a conversion by myself.
Thanks in advance,
Kaze
Currently what I do is that, if a newsfeed contains a link that links to app.facebook.com, I assume it's posted by an FB app.
Posts in /me/feed that have been made by/using an app should have a property "application" set, which contains the app name, namespace and id – so by just looking for that you should be able to determine if it was posted by an app or manually.
I am new to facebook api. I want to search for a particular word on facebook. I have gone through the documentation at https://developers.facebook.com/docs/reference/api/. But I dont know how to construct the query in PHP.
Could any one please provide a sample code. Also how do I specify the count and page (like twitter)?
I am currently using the API provided by facebook. I saw that there are alternative API's but I would like to restrict the API to the official one
Facebook provides the search functionality which is like searching using the search inside facebook.com.
To read about it go to here: http://developers.facebook.com/docs/reference/api/#searching
Edit
As it states in that document:
When searching for public posts or posts on the user's News Feed, you
can page over the results by using the since, until and limit
parameters. since and until both accept a unix timestamp.
Also, just a bit above the "searching" section there's the "Paging" section, using both you can come up with:
https://graph.facebook.com/search?q=coffee&type=place&offset=X&limit=4
Which in terms of using the php sdk, is probably like: "search?q=coffee&type=place&offset=X&limit=4"