douxinghuai3150 2011-07-13 14:24 采纳率: 0%
浏览 39
已采纳

Facebook问题:无法在未经授权的情况下将用户ID转入iframe

I have a facebook page with an iframe app.

I want it to be able to work in the same way as http://www.facebook.com/pepsi With the following user journey.

  1. User goes app tab on my page.
  2. User is prompted with a page, partial content, that invites to click the like button
  3. User clicks like and is shown full content.

all this is done without the client needing to login or authenticate.

My problem is that facebook is not passing me the user id.

I have tried var_dump($_REQUEST); and var_dump($fb->fb_params); to see if user id is there but nothing.

I dont think php sdk 3.0 or oauth works for signed_request

Can someone tell me how I get the user id from facebook without login?

thanks

  • 写回答

1条回答 默认 最新

  • dtv7174 2011-07-13 14:30
    关注

    Unless the user grants your application permission, the signed request will not contain their user id. See the docs for signed request.

    If the user has not authorized your application, your application will only be passed a subset of the above information.

    This includes the user object (although it'd be nice if Facebook specifically mentioned what data is or is not passed for unauthorized users - I banged my head against the wall for a bit trying to figure this out.)

    That being said, you don't need a user to be authorized in order to "like-gate" a page.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么