Answered by:
Winrt Facebook App Integration

Question
-
Hi,
I have been trying to integrate facebook app v5 and above in my app. The issue is when I log out of my app account and retry to signin with facebook app I get a exception "Exception = {System.Exception: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification"The exception is for the code - "var success = await Windows.System.Launcher.LaunchUriAsync(uri);"
P.S - It works fine on a retry.
Kindly help.
Monday, March 9, 2015 10:47 AM
Answers
-
No. you don’t need that control, there is no webview control using in the above code sample. Maybe people don’t have intention to communicate with facebook app using this way. We have no choice to change those thing in facebook app.
I suggest you change to use build-in API to share access token and it’s easily to use code sample to get started.
- Proposed as answer by Herro wongMicrosoft contingent staff, Moderator Tuesday, March 24, 2015 1:52 AM
- Marked as answer by Jamles HezModerator Thursday, March 26, 2015 6:07 AM
Thursday, March 19, 2015 3:23 AM
All replies
-
You'll need to post a project to Onedrive and give us the link to troubleshoot this problem.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Monday, March 9, 2015 3:19 PMModerator -
Hi Matt,
Kindly find a sample code using the link.
https://onedrive.live.com/redir?resid=D7A9766C4803A563!115&authkey=!AA5kFOcX--62jnQ&ithint=file%2crar
You have to fill your windows app detail in the packagemanifest protocol extension and facebookapp details in the fbconnect uri in FacebookLogin class.
Wednesday, March 11, 2015 10:38 AM -
Hey Matt,
Is there any update on this?
Regards.
Monday, March 16, 2015 6:59 AM -
This error may caused by Facebook API, have you singed out with your facebook account when you log out app? You may need check account status, https://developers.facebook.com/docs/facebook-login/login-for-windows-phone/, the link provides more info.Tuesday, March 17, 2015 2:19 AM
-
Nithak, I have used the same link to integrate the app. There is nothing as such that can help me over come this issue.Have you downloaded the app from the link?If you do, u will understand what is the issue.Tuesday, March 17, 2015 6:02 AM
-
digging in, I have realized that Facebook App keeps on running in the background.So when it tries to resume next time to log in it throws the exception and kills the app in the background.Retry works fine.
- Edited by naddy095 Wednesday, March 18, 2015 8:12 AM
Wednesday, March 18, 2015 8:10 AM -
I understand what you have said. But I think there is no solution for this issue.
When you use Launcher.LaunchUriAsync method, the URI is passes to the associated app. In this case it is facebook app. The app must do something with that URI. Unfortunately, we have no choice to interrupt and effect the relogin process in facebook app. I guess you may want to share the access token of facebook, you can try to use WebAuthenticationBroker class. https://msdn.microsoft.com/en-us/library/windows/apps/windows.security.authentication.web.webauthenticationbroker.aspx. You can also get a code sample from the above link.
- Proposed as answer by Herro wongMicrosoft contingent staff, Moderator Tuesday, March 24, 2015 1:52 AM
Wednesday, March 18, 2015 8:35 AM -
this WebAuthentication requires a web view.I want to integrate the app.
Question is how no other developers have faced this issue?- Edited by naddy095 Wednesday, March 18, 2015 9:47 AM
Wednesday, March 18, 2015 9:42 AM -
No. you don’t need that control, there is no webview control using in the above code sample. Maybe people don’t have intention to communicate with facebook app using this way. We have no choice to change those thing in facebook app.
I suggest you change to use build-in API to share access token and it’s easily to use code sample to get started.
- Proposed as answer by Herro wongMicrosoft contingent staff, Moderator Tuesday, March 24, 2015 1:52 AM
- Marked as answer by Jamles HezModerator Thursday, March 26, 2015 6:07 AM
Thursday, March 19, 2015 3:23 AM