user2386721
user2386721

Reputation: 31

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?

Upvotes: 0

Views: 833

Answers (2)

Sebastian
Sebastian

Reputation: 11

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.

Upvotes: 0

Tim Griffiths
Tim Griffiths

Reputation: 994

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

Upvotes: 1

Related Questions