当前位置: 首页>>代码示例>>Java>>正文


Java Page.getLink方法代码示例

本文整理汇总了Java中com.restfb.types.Page.getLink方法的典型用法代码示例。如果您正苦于以下问题:Java Page.getLink方法的具体用法?Java Page.getLink怎么用?Java Page.getLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.restfb.types.Page的用法示例。


在下文中一共展示了Page.getLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
    }

}
 
开发者ID:MKLab-ITI,项目名称:simmo,代码行数:48,代码来源:FacebookAccount.java

示例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();
	}
	
}
 
开发者ID:socialsensor,项目名称:socialmedia-abstractions,代码行数:52,代码来源:FacebookStreamUser.java

示例3: getLikeFromApi

import com.restfb.types.Page; //导入方法依赖的package包/类
private FacebookLike getLikeFromApi(String pageID) {
	Connection<Page> thepage = apiConnection.fetchConnection(pageID, Page.class);
	Page page = thepage.getData().get(0);
	FacebookLike like = new FacebookLike(page.getId(), page.getUsername(), page.getDescription(), page.getLink(), page.getCategory());
	return like;
}
 
开发者ID:fabiogermann,项目名称:zhaw-facepath,代码行数:7,代码来源:FacebookFacade.java


注:本文中的com.restfb.types.Page.getLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。