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


Java Request.getParameters方法代码示例

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


在下文中一共展示了Request.getParameters方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRequest

import com.facebook.Request; //导入方法依赖的package包/类
private Request createRequest(String userID, Set<String> extraFields, Session session) {
    Request request = Request.newGraphPathRequest(session, userID + "/friends", null);

    Set<String> fields = new HashSet<String>(extraFields);
    String[] requiredFields = new String[]{
            ID,
            NAME
    };
    fields.addAll(Arrays.asList(requiredFields));

    String pictureField = adapter.getPictureFieldSpecifier();
    if (pictureField != null) {
        fields.add(pictureField);
    }

    Bundle parameters = request.getParameters();
    parameters.putString("fields", TextUtils.join(",", fields));
    request.setParameters(parameters);

    return request;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:22,代码来源:FriendPickerFragment.java

示例2: createRequest

import com.facebook.Request; //导入方法依赖的package包/类
private Request createRequest(String userID, Set<String> extraFields, Session session) {
    Request request = Request.newGraphPathRequest(session, userID + friendPickerType.getRequestPath(), null);

    Set<String> fields = new HashSet<String>(extraFields);
    String[] requiredFields = new String[]{
            ID,
            NAME
    };
    fields.addAll(Arrays.asList(requiredFields));

    String pictureField = adapter.getPictureFieldSpecifier();
    if (pictureField != null) {
        fields.add(pictureField);
    }

    Bundle parameters = request.getParameters();
    parameters.putString("fields", TextUtils.join(",", fields));
    request.setParameters(parameters);

    return request;
}
 
开发者ID:dannegm,项目名称:BrillaMXAndroid,代码行数:22,代码来源:FriendPickerFragment.java

示例3: createRequest

import com.facebook.Request; //导入方法依赖的package包/类
private Request createRequest(Location location, int radiusInMeters, int resultsLimit, String searchText,
        Set<String> extraFields,
        Session session) {
    Request request = Request.newPlacesSearchRequest(session, location, radiusInMeters, resultsLimit, searchText,
            null);

    Set<String> fields = new HashSet<String>(extraFields);
    String[] requiredFields = new String[]{
            ID,
            NAME,
            LOCATION,
            CATEGORY,
            WERE_HERE_COUNT
    };
    fields.addAll(Arrays.asList(requiredFields));

    String pictureField = adapter.getPictureFieldSpecifier();
    if (pictureField != null) {
        fields.add(pictureField);
    }

    Bundle parameters = request.getParameters();
    parameters.putString("fields", TextUtils.join(",", fields));
    request.setParameters(parameters);

    return request;
}
 
开发者ID:yeloapp,项目名称:yelo-android,代码行数:28,代码来源:PlacePickerFragment.java

示例4: getUser

import com.facebook.Request; //导入方法依赖的package包/类
@Override
public void getUser(final Callback<SocialMember> callback) {
    if (notifyIfNotLoggedIn(callback)) {
        return;
    }

    //If the profile for the current user has already been fetched use the cached result.
    if (userProfile != null) {
        callback.onSuccess(userProfile);
        return;
    }

    Session session = Session.getActiveSession();
    Request request = Request.newMeRequest(session, new Request.GraphUserCallback() {
        @Override
        public void onCompleted(GraphUser user, Response response) {
            if (!notifyIfError(response, callback)) {
                logger.debug(user.getUsername() + ":" + user.getName() + ":" + user.getFirstName()
                        + ":" + user.getLastName() + ":" + user.getId());
                logger.debug(user.getProperty("email") + "");
                SocialMember member = new SocialMember(Long.parseLong(user.getId()), user.getName());
                member.setEmail(user.getProperty("email") + "");
                callback.onSuccess(member);
            }
        }
    });
    Bundle params = request.getParameters();
    params.putString("fields", "email,id,name");
    request.setParameters(params);
    request.executeAsync();
}
 
开发者ID:edx,项目名称:edx-app-android,代码行数:32,代码来源:FacebookProvider.java

示例5: createRequest

import com.facebook.Request; //导入方法依赖的package包/类
private Request createRequest(Session session) {
    Request request = Request.newGraphPathRequest(session, "me/friends", null);

    Set<String> fields = new HashSet<String>();
    String[] requiredFields = new String[] { "id", "name", "picture" };
    fields.addAll(Arrays.asList(requiredFields));

    Bundle parameters = request.getParameters();
    parameters.putString("fields", TextUtils.join(",", fields));
    request.setParameters(parameters);

    return request;
}
 
开发者ID:josenaves,项目名称:facebook-friends,代码行数:14,代码来源:FriendsActivity.java


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