Facebook oauth / access_token丢失 [英] Facebook oauth/access_token missing

查看:223
本文介绍了Facebook oauth / access_token丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我失去了某些东西,但是在这里,Dunno。我试图获得一个access_token为我的应用程序,以便它可以去查找Facebook上某些公共组织的事件,而不需要用户登录。



尝试从
https://graph.facebook.com/oauth/access_token?client_secret=foobar&client_id=foobar&grant_type=client_credentials&format=json&sdk=ios



这将返回一个字符串:access_token = xxxx | ugtqdoWfvvo5_S-Fo2D7_I4rdbc



这很好,所有,但它没有json。任何关于为什么返回的字符串不是json编码的见解



注意:
我使用Facebook ios SDK功能像这样
[_facebook requestWithGraphPath: @oauth / access_tokenandParams:params andHttpMethod:@POSTandDelegate:self];

解决方案

这是一个 BUG https://developers.facebook.com/bugs/325262010847554



Facebook的OAuth 2.0实现显然违反了规范: http://tools.ietf.org/html/draft-ietf-oauth-v2-25#section-5.1



我使用的是服务器端Web App流程,并且具有与iOS SDK相同的问题。


Dunno if Im missing something but here goes. Im trying to get an access_token for my application so that it can go and look up events for certain public groups on facebook, without requiring a user to be logged in.

Im trying to get an access_token from https://graph.facebook.com/oauth/access_token?client_secret=foobar&client_id=foobar&grant_type=client_credentials&format=json&sdk=ios

This returns a string: access_token=xxxx|ugtqdoWfvvo5_S-Fo2D7_I4rdbc

Thats nice and all, but its no json. Any insights on why the returned string is not json encoded ?

Note: Im using the Facebook ios SDK function like so [_facebook requestWithGraphPath:@"oauth/access_token" andParams:params andHttpMethod:@"POST" andDelegate:self];

解决方案

This is a BUG: https://developers.facebook.com/bugs/325262010847554

Facebook's OAuth 2.0 implementation is clearly in violation of the spec: http://tools.ietf.org/html/draft-ietf-oauth-v2-25#section-5.1

I'm using Server-side Web App flow and have the same issue that you describe for the iOS SDK.

这篇关于Facebook oauth / access_token丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆