本文整理匯總了Java中com.facebook.FacebookSdk.isFacebookRequestCode方法的典型用法代碼示例。如果您正苦於以下問題:Java FacebookSdk.isFacebookRequestCode方法的具體用法?Java FacebookSdk.isFacebookRequestCode怎麽用?Java FacebookSdk.isFacebookRequestCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.FacebookSdk
的用法示例。
在下文中一共展示了FacebookSdk.isFacebookRequestCode方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setRequestCode
import com.facebook.FacebookSdk; //導入方法依賴的package包/類
/**
* Set the request code for the startActivityForResult call. The requestCode should be
* outside of the range of those reserved for the Facebook SDK
* {@link com.facebook.FacebookSdk#isFacebookRequestCode(int)}.
*
* @param requestCode the request code to use.
*/
protected void setRequestCode(int requestCode) {
if (FacebookSdk.isFacebookRequestCode(requestCode)) {
throw new IllegalArgumentException("Request code " + requestCode +
" cannot be within the range reserved by the Facebook SDK.");
}
this.requestCode = requestCode;
}
示例2: onActivityResult
import com.facebook.FacebookSdk; //導入方法依賴的package包/類
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (FacebookSdk.isFacebookRequestCode(requestCode)) {
callbackManager.onActivityResult(requestCode, resultCode, data);
}
}
示例3: isRequestCodeOurs
import com.facebook.FacebookSdk; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override
public boolean isRequestCodeOurs(final int requestCode) {
return FacebookSdk.isFacebookRequestCode(requestCode);
}
示例4: setRequestCode
import com.facebook.FacebookSdk; //導入方法依賴的package包/類
/**
* Set the request code for the startActivityForResult call. The requestCode should be
* outside of the range of those reserved for the Facebook SDK
* {@link com.facebook.FacebookSdk#isFacebookRequestCode(int)}. This method should also be
* called prior to registering any callbacks.
*
* @param requestCode the request code to use.
*/
protected void setRequestCode(final int requestCode) {
if (FacebookSdk.isFacebookRequestCode(requestCode)) {
throw new IllegalArgumentException("Request code " + requestCode +
" cannot be within the range reserved by the Facebook SDK.");
}
this.requestCode = requestCode;
}