Save Facebook image to the database

1

Galera, I know it's very simple, but I'm having difficulties. I've seen some topics here, but I still have not been clear on how to do it.

I need to save the Facebook image in the database, uploading it to the database. The information that arrives for me from facebook is this:

https://graph.facebook.com/"+id+"/picture?width=600

But, everyone knows that this way I can not do upload . Anyone know how I can solve this? There are some topics that have already been posted here, but they did not post the solution, at least for me it was not well clarified.

Thank you in advance.

    
asked by anonymous 13.06.2016 / 23:27

1 answer

0

Here are three alternatives:

copy("https://graph.facebook.com/"+id+"/picture?width=600");

Or

fopen("http://graph.facebook.com/"+id+"/picture");

Or

file_get_contents("http://graph.facebook.com/"+id+"/picture");
    
19.10.2016 / 21:27