English 中文(简体)
ju 方言
原标题:wap dialogs deprecated on july 2012

我在本周早些时候用WP7.1(Mango)的附录对Facebook C# SDK v6.0.16进行了审判。

The goal is to post a photo on the wall of a user through a facebook app, so I started to implement login to get an access token. Bad surprise, I can t get a combination that works fine:

  • using the desktop page give a very small display on the phone screen
  • using the mobile page is fine, however gives the following error after login is successful:

"An error occurred with YOURAPP. Please try again later. API Error Code: 11 API Error Description: This method is deprecated Eror Message: Display=wap dialogs have been deprecated. Yo can temporarily enable them by disabling the "july_2012" migration. They will stop working permanntly on July, 2012."

守则一的使用是:

    private Uri GenerateLoginUrl(string appId, string extendedPermissions)
    {
        var parameters = new Dictionary<string,object>();

        parameters["client_id"] = appId;
        parameters["mobile"] = true;
        parameters["redirect_uri"] = "https://www.facebook.com/connect/login_success.html";
        parameters["response_type"] = "token";
        parameters["display"] = "touch";
        if (!string.IsNullOrWhiteSpace(extendedPermissions))
            parameters["scope"] = extendedPermissions;

       return fb.GetLoginUrl(parameters);
    }

以及产生的尿素记录仪是SDK本身产生的m.facebook.com/dialog/oauth?etcetc。

令我看,SDK本身偏离了对APIC的解读,或者我失踪了。

Any suggestion? Thank you

问题回答

C# SDK不再得到Facebook的支持,因此FB不会在其中解决问题。

只需改动 para amount to page

var parameters = new Dictionary<string, object>();
parameters["client_id"] = appId;
parameters["redirect_uri"] = "https://www.facebook.com/connect/login_success.html";
parameters["response_type"] = "token"; 
parameters["display"] = "page";
if (!string.IsNullOrEmpty(extendedPermissions))
{  
    parameters["scope"] = extendedPermissions; 
}
return _fb.GetLoginUrl(parameters);




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签