通过 ACTION_SEND 从 Android 应用程序在 Facebook 上分享文本 [英] Share Text on Facebook from Android App via ACTION_SEND

查看:47
本文介绍了通过 ACTION_SEND 从 Android 应用程序在 Facebook 上分享文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Android 应用,它支持通过其他应用发送文本.因此,它使用 ACTION_SEND 意图和 EXTRA_TEXT 字段.选择器向我展示了所有可以处理这种意图的应用程序.这些是 Twitter、电子邮件、...和 ​​Facebook.但是当我选择 Facebook 时,它会打开浏览器并转到以下页面:

I have an Android app and it supports sending text via other apps. It therefore uses the ACTION_SEND intent and the EXTRA_TEXT field. The chooser presents me with all apps that can handle such an intent. Those are Twitter, Email, ... and Facebook. But when I select Facebook it opens the browser and goes to the following page:

http://m.facebook.com/sharer.php?u=mytext

它显示了我的文本和提交按钮.但是当我按下提交按钮时,什么也没有发生.该页面刚刚再次加载.我想也许只能通过 Facebook 应用程序发送 URL.可以吗?

It shows my text and the submit button. But when I press the submit button nothing happens. The page just loads again. I think maybe it is only possible to send URLs via the Facebook App. Could that be?

是否有人设法通过 Facebook Android 应用通过 ACTION_SEND 发送文本?

Did anyone manage to send text via ACTION_SEND through the Facebook Android app?

推荐答案

已随着适用于 Android 的官方 Facebook 应用的新版本(2011 年 7 月 14 日)IT WORKS!!!

EDITED: with the new release of the official Facebook app for Android (July 14 2011) IT WORKS!!!

OLD:如果用户选择 Facebook 应用进行分享,则上述示例不起作用,但如果用户选择 Seesmic 应用发布到 Facebook,则它们确实起作用.我猜 Seesmic 比 Facebook 有更好的 Facebook API 实现!

OLD: The examples above do not work if the user chooses the Facebook app for sharing, but they do work if the user chooses the Seesmic app to post to Facebook. I guess Seesmic have a better implementation of the Facebook API than Facebook!

这篇关于通过 ACTION_SEND 从 Android 应用程序在 Facebook 上分享文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆