通过与自动解析Android应用程序在Facebook上分享链接 [英] Share link on Facebook via android app with automatic parsing

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

问题描述

在张贴在Facebook上的链接时,链接到的文章自动解析,显示的链接,文章标题,简短的描述,和缩略图。

我想要做同样的事情,但是从我的Andr​​oid应用程序。我已经设置了Facebook的SDK已经和日志的功能,并请求许可,已工作的罚款。但是,我不知道如何继续分享在Facebook上的链接,并自动让Facebook的处理解析。

我也想显示Facebook发布对话框,让用户可以添加个人信息的共享链接。现在,我使用了Facebook的对话方法,但它不工作。它甚至没有显示该对话框。任何想法?

 捆绑参数=新包();
parameters.putString(链接的链接);
//后用户的墙上。
facebook.dialog(背景下,食,参数,新PostDialogListener());
 

解决方案

最后,我得到这个工作。事实证明,在code我在上面使用是工作的罚款。问题是,我得到一个Facebook的错误是由于不正确的哈希键。

When posting a link on Facebook, the link to an article is automatically parsed, displays the link, article title, short description, and a thumbnail.

I want to do the same thing, but from my android app. I have set up the Facebook SDK already and the log in feature and request for permission is already working fine. However, I don't know how to proceed with sharing a link on Facebook, and automatically let Facebook handle the parsing.

I also want to display the Facebook post dialog, so that the user can add a personal message with the shared link. Right now, I'm using the dialog method of Facebook but it doesn't work. It doesn't even display the dialog box. Any ideas?

Bundle parameters = new Bundle();
parameters.putString("link", link);
// post on user's wall.
facebook.dialog(context, "feed", parameters, new PostDialogListener());

解决方案

Finally, I got this to work. It turns out that the code I'm using above is working fine. The problem was that I was getting a facebook error due to incorrect hash key.

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

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