简体   繁体   中英

Post to Facebook WP8 C#

So I used this example

http://facebooksdk.net/docs/phone/howtos/publish-to-feed/

And when I tap the button I made, it shares a preset link. How do I change it to a textbox i have in the app?

And I use this code:

App.RootFrame.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));

To redirect back to the mainpage after posting a message on facebook. but if i tap the back button, it goes back to the previous page i used to post a message. how do I fix it?

You might be better using the phones built in share api. That way the user can share with any social network they've connected to on their phone.

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394009(v=vs.105).aspx

If you do need to do it the way you have then it sounds like you want to intercept the back button event.

http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.controls.phoneapplicationpage.backkeypress(v=vs.105).aspx

You could change the navigation stack with NavigationService.RemoveBackEntry(); after you have navigated away from the posting page.

Perhaps it is possible to run RemoveBackEntry() on the on posting pages OnNavigatedFrom event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM