本文整理匯總了Java中com.facebook.GraphRequest.newDeleteObjectRequest方法的典型用法代碼示例。如果您正苦於以下問題:Java GraphRequest.newDeleteObjectRequest方法的具體用法?Java GraphRequest.newDeleteObjectRequest怎麽用?Java GraphRequest.newDeleteObjectRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.GraphRequest
的用法示例。
在下文中一共展示了GraphRequest.newDeleteObjectRequest方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: revokePermission
import com.facebook.GraphRequest; //導入方法依賴的package包/類
public void revokePermission(final String permission) {
AccessToken token = AccessToken.getCurrentAccessToken();
String uri = "me/permissions/" + permission;
GraphRequest graphRequest = GraphRequest.newDeleteObjectRequest(
token, uri, new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
FacebookRequestError error = response.getError();
if (error == null) {
Utils.d("FB:Revoke:Response:" + response.toString());
getPermissions();
}
}
});
graphRequest.executeAsync();
}
示例2: revokeAccess
import com.facebook.GraphRequest; //導入方法依賴的package包/類
/** GraphRequest **/
public void revokeAccess() {
mAuth.signOut();
AccessToken token = AccessToken.getCurrentAccessToken();
GraphRequest graphRequest = GraphRequest.newDeleteObjectRequest(
token, "me/permissions", new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
FacebookRequestError error = response.getError();
if (error == null) {
Utils.d("FB:Delete:Access" + response.toString());
}
}
});
graphRequest.executeAsync();
}
示例3: deleteRequest
import com.facebook.GraphRequest; //導入方法依賴的package包/類
public static void deleteRequest (String requestId) {
// delete Requets here GraphAPI.
Utils.d("Deleting:Request:" + requestId);
AccessToken token = AccessToken.getCurrentAccessToken();
GraphRequest graphRequest = GraphRequest.newDeleteObjectRequest(
token, requestId, new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
FacebookRequestError error = response.getError();
if (error == null) { Utils.d("OnDelete:Req:" + response.toString()); }
}
});
graphRequest.executeAsync();
}