I like the easy handling with HttpUtils2 but cannot figure out how to catch the data from the oauth-server reply via "redirect URI".
---------------------------------------------------------
With the old HttpUtil I got it working by sending:
wvFbLogin.LoadUrl("https://m.facebook.com/dialog/oauth?client_id="&clientId&"&redirect_uri="&RedirectUri&"&scope=publish_stream&response_type=token")
and recieved redir data:
Sub wvFbLogin_PageFinished (Url As String)
If Url.StartsWith(RedirectUri&"#access_token=") Then
AccessToken = Url.SubString((RedirectUri&"#access_token=").Length)
AccessToken=AccessToken.SubString2(0,AccessToken.IndexOf("&"))
Log(AccessToken) ' -----> "http://myapp.mysite.com/#access_token=AAADW......"
End if
End Sub
---------------------------------------------------------
But if I'm
trying with the new HttpUtils2:
jobFbGetToken.poststring("https://m.facebook.com/dialog/oauth", "client_id="&clientId&"&redirect_uri="&RedirectUri&"&scope=publish_stream&response_type=token")
I receive not the expected data, but some html code without the URI information I need:
Sub JobDone(Job As HttpJob)
If Job.Success = True Then
Select Job.JobName
Case "jobFbGetToken"
Log(Job.GetString) ' ----> <?xml version=.....?><!DOCTYPE html PUBLIC "-/......xhtml-mobile10.dtd">
End select
End If
Job.Release
End Sub
---------------------------------------------------------
Of course I could use the old Webview/LoadURL version, but while I'm changing to the new fantastic HttpUtils2 I'd like to have it coherent.
Regards,
fredo