简体   繁体   中英

how can I share a link on facebook with my universal app 10?

I'm trying to share links on Facebook with my windows universal app 10 (c#), but i can't find any documentation on the subject. All of them are outdated using the windows 8 share charm.

I tried this but I don't want to share the link through the browser.

await Windows.System.Launcher.LaunchUriAsync(new Uri("https://www.facebook.com/sharer/sharer.php?u=http:// "link to share")

How can I proceed?

The Windows SDK for Facebook includes Facebook Authorization, Like, Graph and other Facebook functionality for Windows apps. Code and samples are available on github at https://github.com/Microsoft/winsdkfb . Documentation is at http://microsoft.github.io/winsdkfb

With that library you can use the FBSession.ShowFeedDialogAsync method to let the user share a link with a title and description to their feed. See http://microsoft.github.io/winsdkfb/#feed_dialog for a code snippet demonstrating this.

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