开发者

Facebook.mobileLogin problem. "OAuthException" message: "Error validating application."

I try to login on facebook using facebook action script SDK.

FacebookMobile.init("my_app_id", initCallback);
private function initCallback(success:Object, fail:Object):void
        {
            trace("initCallback");
            trace("success: " + success);
            trace("fail" + fail);

            var appPermissions:Array = new Array("read_stream", "offline_access", "publish_stream", "read_friendlists");
            Facebook.mobileLogin("http://foo.example.com/", "touch", appPermissions);
        }

        private function loginCallback(success:Object, fail:Object):void
        {
            trace("loginCallback");
            trace("success: "开发者_JAVA技巧 + success);
            trace("fail" + fail);
        }

But I fail with error while calling mobileLogin:

{
   "error": {
      "message": "Error validating application.",
      "type": "OAuthException"
   }
}

I read this answer, guys say it helps, but for me it was not successfull. Unable to get access token from Facebook. Got an OAuthException says "Error validating verification code" How can I solve this, anybody help please. Thanx!


Until you have added to your application Configuration a domain on which you application will be running from this will not work it seems. Here are some tips:

1) Define Domain on the Facebook Application configuration page. 2) add one website in this domain to the application by providing its address in Facebook Application configuration page. 3) add the meta tags on the page

<meta property="fb:app_id" content="FILL_YOUR_APPID"/>

with html declaration

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:og="http://opengraphprotocol.org/schema/" 
    xmlns:fb="http://www.facebook.com/2008/fbml">

3) Once you have done that head over to http://developers.facebook.com/tools/debug enter your URL let Facebook cache register the page.


I finded solution:

instead of using

Facebook.mobileLogin("http://foo.example.com/", "touch", appPermissions);

I have used:

FacebookMobile.login(loginCallback, appView.stage, appPermissions, null);

and now I got success on login, uid, and all my user information from facebook. Hope it will help someone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜