照片没有上传到Facebook相册使用图表api [英] photo not upload to facebook album using graph api

查看:127
本文介绍了照片没有上传到Facebook相册使用图表api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ p

Photo not uploaded in facebook album after giving enough file upload permission.... i have also refered related question for graph api still there is no success...

 $facebook->getLoginUrl(array('scope' => 'user_status,publish_stream,user_photos,photo_upload,can_upload'));

                        $album_details = array(
                                'message'=> 'Testing Description For Pic',
                                'name'=> 'Testing Pic Album'
                        );

                        $create_album = $facebook->api('/me/albums', 'post', $album_details);






                        $args = array(
                                'message' => 'Photo from application',
                                'image' => '@'.$imgURL
                        );



                        $url = 'http://graph.facebook.com/'.$create_album['id'].'/photos?access_token='.$aut_key;
                        $ch = curl_init();
                        curl_setopt($ch, CURLOPT_URL, $url);
                        curl_setopt($ch, CURLOPT_HEADER, false);
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                        curl_setopt($ch, CURLOPT_POST, true);
                        curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
                        $data = curl_exec($ch);


推荐答案

我遇到同样的问题,

请尝试确保$ imgURL是服务器上的相对图像位置,而不是图像的通用网址。

Please try to make sure that $imgURL is the relative image location on your server and not a generic web url of the image.

另外,尝试在这里交叉检查 http://developers.facebook.com/blog/post/ 498 /

Also, try to crosscheck here http://developers.facebook.com/blog/post/498/

这篇关于照片没有上传到Facebook相册使用图表api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆