• <i id='L2v3f'><tr id='L2v3f'><dt id='L2v3f'><q id='L2v3f'><span id='L2v3f'><b id='L2v3f'><form id='L2v3f'><ins id='L2v3f'></ins><ul id='L2v3f'></ul><sub id='L2v3f'></sub></form><legend id='L2v3f'></legend><bdo id='L2v3f'><pre id='L2v3f'><center id='L2v3f'></center></pre></bdo></b><th id='L2v3f'></th></span></q></dt></tr></i><div id='L2v3f'><tfoot id='L2v3f'></tfoot><dl id='L2v3f'><fieldset id='L2v3f'></fieldset></dl></div>
    • <bdo id='L2v3f'></bdo><ul id='L2v3f'></ul>

      <legend id='L2v3f'><style id='L2v3f'><dir id='L2v3f'><q id='L2v3f'></q></dir></style></legend>

      <small id='L2v3f'></small><noframes id='L2v3f'>

      <tfoot id='L2v3f'></tfoot>

        Facebook 图形 API 和PHP SDK 问题

        时间:2023-10-30

              <tbody id='vu7Hr'></tbody>
          1. <i id='vu7Hr'><tr id='vu7Hr'><dt id='vu7Hr'><q id='vu7Hr'><span id='vu7Hr'><b id='vu7Hr'><form id='vu7Hr'><ins id='vu7Hr'></ins><ul id='vu7Hr'></ul><sub id='vu7Hr'></sub></form><legend id='vu7Hr'></legend><bdo id='vu7Hr'><pre id='vu7Hr'><center id='vu7Hr'></center></pre></bdo></b><th id='vu7Hr'></th></span></q></dt></tr></i><div id='vu7Hr'><tfoot id='vu7Hr'></tfoot><dl id='vu7Hr'><fieldset id='vu7Hr'></fieldset></dl></div>
            <legend id='vu7Hr'><style id='vu7Hr'><dir id='vu7Hr'><q id='vu7Hr'></q></dir></style></legend>
          2. <tfoot id='vu7Hr'></tfoot>

                  <bdo id='vu7Hr'></bdo><ul id='vu7Hr'></ul>

                  <small id='vu7Hr'></small><noframes id='vu7Hr'>

                  本文介绍了Facebook 图形 API 和PHP SDK 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在使用 facebook graph api 时遇到了一些问题.

                  I have a couple of problems using facebook graph api.

                  1).当我尝试上传照片时,我收到以下错误(#324)需要上传文件".

                  1). When i try to upload a photo i get the following error "(#324) Requires upload file".

                    $attachement = array(
                                              'access_token'=> (...)',
                                              'name' => 'uploaded foto',
                                              'source' => 'C:Documents and SettingsUsernameDesktop1.jpg'
                                      );
                  
                          $fb_foto = $fb->api('me/photos','POST',$attachement);
                  

                  我确信来源是正确的.我尝试使用来自互联网的照片,而不是来自本地 PC 的照片.

                  I am sure that source is correct. I have tried with a photo from the internet and not from mu local PC also.

                  2).如何从 facebook 中删除对象?(例如墙上的消息).我试过这个:$fb->api('/post_id','POST',array('method'=> 'delete'));

                  2). How can i delete an object from facebook?. (a wall message for example). I have tried this: $fb->api('/post_id','POST',array('method'=> 'delete'));

                  但我收到不支持的 POST 请求"错误.

                  But i get "unsupported POST request" error.

                  任何帮助将不胜感激.

                  这是我找到的将照片上传到 Facebook 的完整解决方案.您需要有 PHP SDK 2.1.1 或以上版本

                   $fb = new Facebook(array(
                                          'appId'  => ...,
                                          'secret' => ...,
                                          'cookie' => true,
                          ));
                  
                  $fb->setFileUploadSupport(true);
                        $attachement = array(
                                              'access_token'=> '...',
                                              'name' => 'uploaded foto',
                                              'source' => '@absolute_path_to_the_file'
                                      );
                  
                  
                  
                        $fb_foto = $fb->api('me/photos','POST',$attachement);
                  

                  推荐答案

                  关于你的第二个问题,我记得在某处读过关于 DELETE 请求,而不是 POST.看:http://developers.facebook.com/docs/api#deleting

                  Concerning your 2nd problem, I remember reading somewhere about a DELETE request, instead of POST. See: http://developers.facebook.com/docs/api#deleting

                  这篇关于Facebook 图形 API 和PHP SDK 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:此应用程序已禁用向其他用户发布动态消息 下一篇:php解析sdk->你好世界错误

                  相关文章

                  <legend id='vSdY0'><style id='vSdY0'><dir id='vSdY0'><q id='vSdY0'></q></dir></style></legend>
                • <i id='vSdY0'><tr id='vSdY0'><dt id='vSdY0'><q id='vSdY0'><span id='vSdY0'><b id='vSdY0'><form id='vSdY0'><ins id='vSdY0'></ins><ul id='vSdY0'></ul><sub id='vSdY0'></sub></form><legend id='vSdY0'></legend><bdo id='vSdY0'><pre id='vSdY0'><center id='vSdY0'></center></pre></bdo></b><th id='vSdY0'></th></span></q></dt></tr></i><div id='vSdY0'><tfoot id='vSdY0'></tfoot><dl id='vSdY0'><fieldset id='vSdY0'></fieldset></dl></div>
                  <tfoot id='vSdY0'></tfoot>
                    <bdo id='vSdY0'></bdo><ul id='vSdY0'></ul>

                    <small id='vSdY0'></small><noframes id='vSdY0'>