當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。