Facebook FQL: getting group status photos

I am trying to pull photos from a user message within a group. Messages in a group seem to be created as a “photo” or “status”.

I can pull photos from a message in a group when it is created as a “photo” using this:

SELECT attachment FROM stream WHERE post_id="<postid>" 

But if the message was created as a "status", this request does not return any data for the attachment.

Here is an example of a post created as a “status” and results. There is no data to attach (photo), when I know that there is a photo that comes with this message.

 SELECT attachment, type, message, created_time FROM stream WHERE post_id = '<postid>' { "data": [ { "attachment": { "description": "" }, "type": 308, "message": "Ceramic wall hanging with mirror from Spain (6\"x8\") $5 pickup in SR", "created_time": 1379101402 } ] } 

Is this a revision or am I just not pulling from the correct table (s) for this type of message?

Thank you, Chris

+4
source share
1 answer

Just saying this works fine for me:

 SELECT post_id, attachment, type, message, created_time FROM stream WHERE post_id="POST_ID" 

POST_ID as follows: 481234567779150_559912345679366 . The permissions that I use are user_groups and user_friends .

 { "data": [ { "post_id": "481234567779150_559912345679366", "attachment": { "media": [ { "href": "https://www.facebook.com/photo.php?fbid=10123450&set=gm.5599123456789366&type=1&relevant_count=1", "alt": "bla bla bla", "type": "photo", "src": "https://fbcdn-photos-fa.akamaihd.net/hphotos-ak-prn1/1013188_102013456789034740_1177097408_s.jpg", "photo": { "aid": "65904234567838363", "pid": "65904345678990795", "fbid": "10202345678934740", "owner": 1533245678910, "index": 1, "width": 1032, "height": 581, "images": [ { "src": "https://fbcdn-photos-fa.akamaihd.net/hphotos-ak-prn1/1013188_10123456789_1177097408_s.jpg", "width": 130, "height": 73 } ] } } ], "name": "", "caption": "", "description": "", "properties": [ ], "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif", "fb_object_type": "photo", "fb_object_id": "65123456789090795" }, "type": 308, "message": "bla bla bla", "created_time": 1373368884 } ] } 

Have you tried your request in Graph API Explorer ? Can you give more information? What is this secret, public group? Is the user one of your friends? I personally tried with both public and private groups, as well as with friends or friends. Can you confirm this with other 308 posts with a photo and multiple groups?

+1
source

Source: https://habr.com/ru/post/1502114/


All Articles