asp.net - Is CanvasAuthorizer.Authorize() in facebook C# sdk 4.0.1 broken? -
i have been using old facebook c# sdk (version 4.0.1) in canvas application (asp.net web forms) facebook. functionality utilize sdk authorize user , facebook user id. api working user installed canvas app not new users.
i have below code:
dim lfacebookapp facebookapp() dim lcanvasauthorizer canvasauthorizer dim lfacebooksettings new facebooksettings() dim lcanvassettings new canvassettings() lfacebooksettings.appid = "xxxxxxxx" lfacebooksettings.appsecret = "xxxxxxxxxx" lfacebooksettings.cookiesupport = true lcanvassettings.canvaspageurl = "canvaspageurl" lcanvassettings.canvasurl = "canvasurl" lcanvassettings.authorizecancelurl = new uri("http://www.facebook.com") lfacebookapp = new facebookapp(lfacebooksettings) lcanvasauthorizer = new canvasauthorizer(facebookapp, lcanvassettings) lcanvasauthorizer.perms = "user_about_me, publish_stream" if (lcanvasauthorizer.authorize()) dim info = lfacebookapp.get("me") dim userid = info.id end if
how used work: when new user browses www.apps.facebook.com/<appname>
, lcanvasauthorizer.authorize()
automatically opens log in dialog , oauth dialog box.
but, throwing below error @ dim info = lfacebookapp.get("me")
(oauthexception) error validating access token: session invalid because user logged out.
lcanvasauthorizer.authorize()
supposed open oauth dialog user not. old facebook c# sdk broken?
facebook c# sdk version 4.0.1 deprecated. utilize latest version.
c# asp.net facebook facebook-c#-sdk
No comments:
Post a Comment