场景:我正在通过一个应用程序,我需要从Facebook下载用户的个人资料图片,应用特定的过滤器,然后重新上传和设置它作为个人资料图片,这是可能使用这个技巧。 'makeprofile = 1'保存用户的个人资料图片从Facebook的API - PHP SDK V.5
http://www.facebook.com/photo.php?pid=xyz&id=abc&makeprofile=1
问题: 所以我面临的问题是,同时通过API下载从接收到的URL的图像。我获得的图片URL是这样的:
$request = $this->fb->get('/me/picture?redirect=false&width=9999',$accessToken); // 9999 width for the desired size image
// return object as in array form
$pic = $request->getGraphObject()->asArray();
// Get the exact url
$pic = $pic['url'];
现在我想从获得的URL将图像保存到一个目录我的服务器上,这样我可以应用过滤器,并重新上传。 当我使用的file_get_contents ($ PIC)它抛出以下错误
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
我已经尝试了一些其他的方法很好,但不能此问题得到解决。任何帮助将不胜感激:)
NOTE:我通过Codeigniter和本地主机现在这样做。
你可以上传图片成功回到Facebook的? – Kyslik