Quantcast
Channel: Active questions tagged news-feed+ios+facebook - Stack Overflow
Viewing all articles
Browse latest Browse all 28

Proper way to get facebook story image?

$
0
0

Using the using the Facebook Graph API/SDK for iOS I'm getting the users News Feed with https://graph.facebook.com/me/home. Some of the news feed items return a "story":"xxx" in the JSON response, if the stories contain an image it will be accompanied by a "picture" element. The picture element always returns the small image size.

Here is an example:

"id":"100000238965505_364153823602580",
    "from":{
        "name":"Cristine Candelaria",
        "id":"100000238965505"
    },
    "story":"Cristine Candelaria was tagged in Arielen Magno Bismar's photo.",
    "picture":"http:\/\/photos-g.ak.fbcdn.net\/hphotos-ak-snc7\/431768_2610303545476_1491618385_31927362_2089838362_s.jpg",
    "link":"http:\/\/www.facebook.com\/photo.php?fbid=2610303545476&set=at.2610291065164.2111576.1491618385.100000238965505&type=1",
    "icon":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yz\/r\/StEh3RhPvjk.gif",
    "type":"photo",
    "object_id":"2610303545476",
    "application":{
        "name":"Photos",
        "id":"2305272732"
    }

I've tried using what Facebook recommends in the API https://graph.facebook.com/2610303545476/picture, however this always returns a false in the JSON response and I've also tried just getting the feed details via [Graph API URL]/100000238965505_364153823602580 (sorry I can only post 2 hyperlinks). This does not yield any extra usefully information.

I've discovered that if you manipulated the end of the "photo" element URL and simply switch the _s to _n you will get the normal image size.

My question is what's the proper way to get the image and the text associated with that image (ex: first time at the super bowl...) for a News Feed using the Graph API?


Viewing all articles
Browse latest Browse all 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>