简体   繁体   English

WP8 Facebook逐个发送消息

[英]WP8 Facebook send message app-to-app

My question is simple, but I cannot seem to find the answer with Google. 我的问题很简单,但是我似乎无法在Google上找到答案。 I'm working on a Windows Phone 8 app and I would like to offer the possibility to share content with certain people in private. 我正在使用Windows Phone 8应用程序,我想提供与某些人私下共享内容的可能性。 I will add a feature to send by SMS, but I would also like to offer the possibility to send a private message in Facebook. 我将添加一个通过SMS发送的功能,但我也想提供在Facebook中发送私人消息的可能性。

There is a Facebook app for Windows Phone 8 and I wanted to know if there is a way with "App-to-app" communication to have the Facebook app send the message for me. 有一个适用于Windows Phone 8的Facebook应用程序,我想知道是否可以通过“应用程序到应用程序”通信来让Facebook应用程序为我发送消息。 This way, the user could edit the message and choose who to send it to, without my app having to manage this for him. 这样,用户可以编辑消息并选择将消息发送给谁,而我的应用程序不必为他管理消息。 I think it would be a better user experience than using the Facebook API since it would be consistent. 我认为这将比使用Facebook API更好的用户体验,因为它将保持一致。

I looked online and there is a way to make a post. 我在网上看了,有一种方法可以发帖。 However, that's not what I want since my app handles a financial matters. 但是,这不是我想要的,因为我的应用程序处理财务问题。 Is there a simple way to do that ? 有没有简单的方法可以做到这一点?

It depends not on your App but the Facebook App - if it supports such a feature. 它不取决于您的应用程序,而是取决于Facebook应用程序-如果它支持这种功能。

In Windows Phone you can for example associate files and Uri's with certain Apps - MSDN source . 例如,在Windows Phone中,您可以将文件和Uri与某些Apps- MSDN源相关联。 By this it is possible (I think somehow) to pass a file (message) to other App (if that App supports it). 这样,就可以(我以某种方式)将文件(消息)传递给其他应用程序(如果该应用程序支持的话)。 Other problem may be where to save that file - maybe some webservice as IsolatedStorage is a bad idea. 另一个问题可能是该文件的保存位置-也许是某些Web服务,因为IsolatedStorage是一个坏主意。

It will be hard workaround, but surely depend mostly not on your App. 这将是很难的解决方法,但是肯定不会在很大程度上取决于您的应用程序。

In this case I think it will be better to use Facebook API in your App. 在这种情况下,我认为最好在您的应用程序中使用Facebook API。

Use Facebook to do post function like below 使用Facebook执行以下发布功能

await Launcher.LaunchUriAsync(new Uri("fb:post?text=foo"));

Or you need implement an OAuth flow to get Facebook token then do Post by Facebook post API 或者您需要实现OAuth流程以获取Facebook令牌,然后执行Facebook的Post API发布

https://graph.facebook.com//v2.0/me/feed?message=foo&access_token= {TOKEN} https://graph.facebook.com//v2.0/me/feed?message=foo&access_token= {TOKEN}

I think these are the possible ways to achieve what you want. 我认为这些是实现您想要的目标的可能方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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