當前位置: 首頁>>代碼示例>>Java>>正文


Java GraphRequest.newDeleteObjectRequest方法代碼示例

本文整理匯總了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();
}
 
開發者ID:FrogSquare,項目名稱:GodotFireBase,代碼行數:20,代碼來源:FacebookSignIn.java

示例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();
	}
 
開發者ID:FrogSquare,項目名稱:GodotFireBase,代碼行數:20,代碼來源:FacebookSignIn.java

示例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();
}
 
開發者ID:FrogSquare,項目名稱:GDFacebook,代碼行數:17,代碼來源:FacebookSDK.java


注:本文中的com.facebook.GraphRequest.newDeleteObjectRequest方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。