• <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 问题

        Facebook graph API amp; PHP SDK questions(Facebook 图形 API 和PHP SDK 问题)

              <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 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <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'>

                            <tbody id='vSdY0'></tbody>