4

i'm trying to request the stream_tag facebook table with the php api for an application

SELECT post_id,actor_id, target_id
FROM stream_tag 
WHERE target_id= me()

It only get me 10 results. How can i get really all results?

i got all this permission :

email
user_about_me
user_birthday
user_hometown
user_location
user_status
friends_about_me
friends_status

read_stream
read_insights
Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
Mr_DeLeTeD
  • 825
  • 1
  • 6
  • 18

1 Answers1

2

FQL solution

There are 2 possible reasons for the issue I can think of, without access to the actual data:

First reason: You need to add permissions. Specifically:

friends_photo_video_tags
user_photo_video_tags

You may also need permissions for the objects that are tagged inside posts. The "read stream" permission grants access to a wall post's tags but it is not clear from the documentation if it grants access to the tags of the object a post holds as a field, e.g. the tags in a photo in a post.

The following objects can have tags, in addition to the Post object:

Checkins. Permissions needed:

user_checkins
friends_checkins

Photo. Permissions needed:

user_photos
friends_photos

Video. Permissions needed

user_videos
friends_videos

Second reason: You are experiencing a bug/inconsistency in the stream_tag table. There are inconsistencies with this table reported in the Facebook developer pages, based on tests run by developers. These include:

  • For two status updates from the same user with tagged users, the stream_tag table returns tagging information correctly for one update but returns no information for the second.

  • The stream_tag table doesn't include tags from notes and link comments.

Here is a FBDevWiki summary of reported issues with the stream_tag table, under the heading "Notes/Bugs/Gotchas".

Graph API solution

If adding the above permissions don't help with the FQL query, you can instead call the Graph API 'tagged' connection like so:

https://graph.facebook.com/USER_ID/tagged

which returns tags in posts, photos and videos for the user.

Gunnar Karlsson
  • 28,350
  • 10
  • 68
  • 71
  • i can't ask for these two permissions : friends_photo_video_tags user_photo_video_tags it's doesn't exist from the interface. I'm trying with the others – Mr_DeLeTeD Apr 20 '12 at 12:07
  • You can find the complete permissions list in the Graph Explorer here: https://developers.facebook.com/tools/explorer. Click the 'get Access Token' button to see the two _photo_video_tags permissions listed. Note the Graph Explorer list just mentioned includes more permissions than the official API here: https://developers.facebook.com/docs/authentication/permissions – Gunnar Karlsson Apr 20 '12 at 12:31
  • those perms are just not selectable (as you can see here, http://screencast.com/t/YyVdr6F3Flt) do you think it will change something? i ever got 10 results so if i haven't the good perms, they will not gave me results? – Mr_DeLeTeD Apr 20 '12 at 12:35
  • You could do the permissions request in code: Here's an example: http://stackoverflow.com/questions/4935979/facebook-apps-additional-permissions/4936270#4936270. – Gunnar Karlsson Apr 20 '12 at 12:58
  • i'm really sure i've been tagged more than 10 times! ;) for the first solution, just looking for the tag on a post for the moment (not video/photo/other, i'll see that after) for the second, i try to use limit, but i doesn't work. i'm lost on it... so sad ! – Mr_DeLeTeD Apr 20 '12 at 13:18
  • I've edited my post with a summary of known bugs/inconsistencies with the stream_tag table, and a Graph API solution. – – Gunnar Karlsson Apr 21 '12 at 12:39
  • Ok ok, i'll see that. It's not the answer what i was waiting but ^^ thanks a lot ! – Mr_DeLeTeD Apr 24 '12 at 06:48