本文整理汇总了Java中com.restfb.types.Page.getPicture方法的典型用法代码示例。如果您正苦于以下问题:Java Page.getPicture方法的具体用法?Java Page.getPicture怎么用?Java Page.getPicture使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.restfb.types.Page
的用法示例。
在下文中一共展示了Page.getPicture方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FacebookAccount
import com.restfb.types.Page; //导入方法依赖的package包/类
/**
* Maps the information of a facebook page
*
* @param page - Facebook's page
*/
public FacebookAccount(Page page) {
if (page == null) return;
//Id
setId(Sources.FACEBOOK + "#" + page.getId());
//The id of the page in the network
//userid = page.getId();
//The name of the page
name = page.getName();
//The username of the page
username = page.getUsername();
//The name of the Social Network
source = Sources.FACEBOOK;
//The description of the page
description = page.getAbout();
pageUrl = page.getLink();
if (pageUrl == null) {
pageUrl = username == null ? ("https://www.facebook.com/profile.php?id=" + page.getId()) : ("http://www.facebook.com/" + username);
}
//Avatar of the page
avatarBig = page.getPicture();
if (avatarBig == null) {
avatarBig = "https://graph.facebook.com/" + page.getId() + "/picture";
}
//Number of people talking about the page
numFollowers = page.getTalkingAboutCount().intValue();
//Location
Location loc = page.getLocation();
if (loc != null) {
location = loc.getCity();
}
}
示例2: FacebookStreamUser
import com.restfb.types.Page; //导入方法依赖的package包/类
/**
* Maps the information of a facebook page
* @param page
*/
public FacebookStreamUser(Page page) {
super(SocialNetworkSource.Facebook.toString(), Operation.NEW);
if (page == null) return;
//Id
id = SocialNetworkSource.Facebook+"#"+page.getId();
//The id of the page in the network
userid = page.getId();
//The name of the page
name = page.getName();
//The username of the page
username = page.getUsername();
//The name of the Social Network
streamId = SocialNetworkSource.Facebook.toString();
//The description of the page
description = page.getAbout();
//Link to the page
linkToProfile = page.getLink();
pageUrl = page.getLink();
if(pageUrl == null) {
pageUrl = username==null ? ("https://www.facebook.com/profile.php?id="+userid) : ("http://www.facebook.com/"+username);
}
//Avatar of the page
profileImage = page.getPicture();
if(profileImage == null) {
profileImage = "https://graph.facebook.com/" + userid + "/picture";
}
imageUrl = profileImage;
//Number of people talking about the page
followers = page.getTalkingAboutCount();
//Location
Location loc = page.getLocation();
if(loc != null) {
location = loc.getCity();
}
}