You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS Swift中Facebook直播发布问题:登录后无法推流及权限报错求助

Fixing "Invalid Scopes: public_actions" Error for Facebook Live Streaming on iPad

Let’s break down exactly what’s going wrong here and how to get your live streaming working properly:

  • The core issue: The public_actions permission was deprecated and fully removed by Facebook years ago—it’s no longer a valid scope, which is why you’re seeing that error on your iPad (this would likely pop up on other devices too, even if it’s only visible to you there right now).

To resolve this and enable live stream publishing, follow these steps:

  1. Swap the invalid scope for the correct one
    For Facebook Live video publishing, the official, supported permission is publish_video. This is the scope you need to request instead of the outdated public_actions.

  2. Update your login permission request code
    Locate where you’re initiating the Facebook login flow in your app and replace the old scope with publish_video. Here’s a quick example using the Facebook iOS SDK:

    // Before (invalid)
    loginManager.logIn(permissions: ["public_actions"], viewController: self)
    
    // After (correct)
    loginManager.logIn(permissions: ["publish_video"], viewController: self)
    
  3. Check your Facebook Developer Dashboard settings

    • Navigate to your app’s page in the Facebook Developer Dashboard, go to the "App Review" section, and ensure publish_video is added to your requested permissions.
    • If your app is public (available to users outside your test accounts), you’ll need to submit the publish_video permission for Facebook’s app review and get it approved before regular users can use the live streaming feature. Test accounts can use it without approval during development.
  4. Validate permissions after login
    After a user completes the login flow, confirm that they’ve granted the publish_video permission before attempting to start a live stream. You can fetch the list of granted permissions via the Facebook SDK to avoid unexpected failures.

Once you make these changes, the "Invalid Scopes" error should disappear, and you’ll be able to successfully publish live streams to Facebook from your iPad.

内容的提问来源于stack exchange,提问作者PvDev

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:40:35