dongyi2889 2013-01-22 16:31
浏览 12

如何使用我的应用程序请求这样的发布流?

I have two questions.

1 - how can my app request publish stream like this, all in one screen?

enter image description here

2 - is it possible to make a app like two or more pages, I already can make people like using signed_request, but lets assume I'll get people's permission, is there any way to make people like a different page?

Example: after people "like" my page where the app is, I'll get permission, then my app use this permission to like a different page or url, any way?

  • 写回答

2条回答 默认 最新

  • doulu4534 2013-01-22 17:00
    关注

    Answering the first part:

    $user = $facebook->getUser();
    if (!$user) {
    $url = $facebook->getLoginUrl(array(
               'scope'=>'publish_stream,status_update',
               'redirect_uri'=>'http://yourlink/'));
    echo "<p>Redirecting to permission request...</p>";
    echo "<script type=\"text/javascript\">top.location.href = '$url';</script>";
    } else {
    ... your app.
    }
    

    You put the permissions in the scope element. The approval box you get will depend on whichever elements you put there. Only ask for permissions you actually need though.

    --- EDIT ---

    In response to your comments, you also need the following if you are uploading pics using the SDK:

    $facebook->setFileUploadSupport(true);
    

    You do that once you have authenticated.

    You also need a few more permissions:

    'scope'=> 'read_stream, publish_stream, photo_upload, user_photos, user_photo_video_tags'
    

    You may not need all of those, depending on what you are trying to do, so once you get it working try removing the video portion for example.

    I spent a while on this last year, you may find these posts useful:

    http://facebookanswers.co.uk/?p=262

    http://facebookanswers.co.uk/?p=322

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数