facebook api php news feed get large picture -
Need help connecting news feed pictures to my members site and getting bigger photos from news feed.
This is my code to get news feed images
$ json_object = @file_get_contents ('. $ Fb_access_token); $ News_feeds = json_decode ($ json_object, true);
foreach ($ news_feeds ['data'] as $ news_feed) {echo '& lt; Img src = "'. $ News_feed [' Image ']." "/" . '
' This fixes news feed images, but all different sizes.
No Help will be good!
I've looked around a long time and still can not get the answer?
This is an example of a Facebook news feed array. I am trying to take.
[id] = & gt; 1423830694520861_1508536172716979 [from] = & gt; Array ([class] = & gt; public figure [name] = & gt; Dan Blezerian [ID] => 1423830694520861) [to] = & gt; Array ([ If] = & gt; array ([0] = & gt; array ([category] = & gt; public shape [name] = & gt; Jen celter [id] = 244183679061369)) [message] = & Gt; Happy for Jane Celter 21 and its #Nothing Lag [message_tags] => Array ([14] = & gt; Array ([0] = & gt; Hey ([ID] = & gt; 244183679061369 [Name] => Jane Celter [Type] => Page [Offset] => 14 [Length] = & gt; 10))) [Photo] => Https: // scontent-b. xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/p130x130/10563168_1508536129383650_2440015247017447728_n.jpg?oh=bfdb86c35b4b0ffe5a4ad9dbe65aba59&oe=54688CA7 [link] = & gt; Https://www.facebook.com/danbilzerianofficial/photos/a.1425329161037681.1073741829.1423830694520861/1508536129383650/?type=1&relevant_count=1 [icon] = & gt; Https://fbstatic-a.akamaihd.net/rsrc.php/v2/yx/r/og8V99JVf8G.gif I believe _b.jpg me _n.jpg Will change in or p 130x130 to b740x740 function is not working ??
I have tried to run this function before / after the foreach loop but it still does not work?
$ news_feed ['picture'] = str_replace ("_n.jpg", "_b.jpg", $ news_feed ['picture']);
$ news_feed ['picture'] = str_replace ("p130x130", "b740x740", $ news_feed ['picture']); Some one can help please :( Thanks
echo & lt; Img src = "https://graph.facebook.com/ '. $ News_feed [' object_id ']. / Picture? Type = normal" & gt; '. '& Lt; Br / & gt; ';
Comments
Post a Comment