Home Facebook SDK - saving url picture
Reply: 0

Facebook SDK - saving url picture

youarewelkommm
1#
youarewelkommm Published in 2018-02-14 08:55:29Z
$response = $FB->get("/me?fields=id, first_name, last_name, email,birthday,link,gender, picture.type(large)", $accessToken);
    $userData = $response->getGraphNode()->asArray();
    $userData = $response->getDecodedBody();
    echo "<pre>";
    var_dump($userData);

What I get

I want to store the data in a variable

I dont know how to get it I tried this:

$_SESSION['foto'] = $userData['picture'];

but that didnt work what am I supposed to do

UPDATE

This does exactly what I wanted it to do.

$fb_foto_url = $userData['picture']['data']['url'];
var_dump($fbfotourl);

Now I want to make a function where I need the url from this because I want to download the picture how do you make the public function? it is something like this?

public function saving_fb_foto ($fbfotourl){}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.344191 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO