如何设置一个图标,并添加一个行动在Facebook的帖子使用facebook api? [英] How to set an icon and add an action in a facebook post using facebook api?

查看:166
本文介绍了如何设置一个图标,并添加一个行动在Facebook的帖子使用facebook api?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用facebook-android-sdk在Facebook上发布消息,显示如下:显示,我找不到一种方式来获取下面的图像。





这是设置图标的正确方法吗?



谢谢。


$ b $如果你在图像中添加了Get Spotify b

  Bundle params = new Bundle(); 
params.putString(message,icon please);
params.putString(link,http://www.digital-farm.org);
params.putString(name,whip'em);
params.putString(description,description);
params.putString(picture,http://lib.store.yahoo.net/lib/yhst-17155638221985/img-twitter.gif); //用于测试
params.putString(icon,http://photos-c.ak.fbcdn.net/photos-ak-snc1/v27562/74/174829003346/app_2_174829003346_2760.gif); //用于测试

mAsyncRunner =新的AsyncFacebookRunner(mFacebook);
mAsyncRunner.request(me / feed,params,POST,新的PostRequestListener(),null);


解决方案

实际上,您在屏幕截图中显示的图标可能Facebook应用程序的图标。它设置在Facebook应用程序的配置/设置中。当您通过Facebook应用程序发布时,该图标应该自动显示。请参见下面的屏幕截图。假设您正在使用Facebook SDK for Android,当您实例化您的Facebook对象时,将您的Facebook应用程序的ID作为参数传递到构造函数中。这就是墙上的贴子与你的Facebook应用程序相关联。




I'm using facebook-android-sdk to post a message on facebook using the bundle shown below.

The message is displayed correctly, but the icon is not shown, and I can't find a way to get something like the image below.

Is this the correct way to set an icon?

How ca I add in the bundle something like "Get Spotify" as seen in the image?

Thanks.

Bundle params = new Bundle();
params.putString("message", "icon please");
params.putString("link", "http://www.digital-farm.org");
params.putString("name", "whip'em");
params.putString("description", "description");
params.putString("picture", "http://lib.store.yahoo.net/lib/yhst-17155638221985/img-twitter.gif"); //used for testing
params.putString("icon", "http://photos-c.ak.fbcdn.net/photos-ak-snc1/v27562/74/174829003346/app_2_174829003346_2760.gif"); //used for testing

mAsyncRunner = new AsyncFacebookRunner(mFacebook);
mAsyncRunner.request("me/feed", params, "POST", new PostRequestListener(), null);  

解决方案

Actually that icon you show in your screen shot is probably the Facebook application's icon. It's set within the Facebook application's configuration/settings. When you post via your Facebook application, the icon should appear automagically. See screen shot below for example.

Assuming you're using the Facebook SDK for Android, when you instantiate your Facebook object, you pass your Facebook application's ID as parameter into the constructor. That's how the wall posting is associated with your Facebook application.

这篇关于如何设置一个图标,并添加一个行动在Facebook的帖子使用facebook api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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