4

내 애플 리케이션 내의 페이스 북에서 printScreen 이미지를 공유하기 위해 Facebook의 ShareDialog를 사용하고 있습니다.facebook shareDialog 앱이 설치되지 않은 경우 - 이상한 행동입니까?

Facebook 앱을 설치하면 문제가 없습니다.

Facebook 앱 이 (가)이 설치되어 있지 않으면 작동하지 않습니다. 나는 "로딩"화면을 본 다음 사라졌으며 아무 일도 일어나지 않습니다.

{FacebookGraphResponseException: (#200) Requires extended permission: publish_actions httpResponseCode: 403, facebookErrorCode: 200, facebookErrorType: OAuthException, message: (#200) Requires extended permission: publish_actions} 

그래서 정말에만 페이스 북의 웹이 아닌 페이스 북의 응용 프로그램에 대한 "publish_actions"권한이 필요합니까 : 공유 대화 상자 객체는 FacebookException와 콜백의 OnError에 도달? 이상한 ..

Facebook writes: 

https://developers.facebook.com/docs/sharing/android

"If the Facebook app is not installed it will automatically fallback to the web-based dialog" 

"Now the SDK automatically checks for the native Facebook app. If it isn't installed, the SDK switches people to their default browser and opens the Feed Dialog." 

내 코드 :

mShareDialog = new ShareDialog(mActivity); 

    mShareDialog.registerCallback(callbackManager, new FacebookCallback<Sharer.Result>() { 
     @Override 
     public void onSuccess(Sharer.Result result) {} 

     @Override 
     public void onCancel() {} 

     @Override 
     public void onError(FacebookException error) { 
      if (error != null) { 
       showDialog("facebook app isn't installed"); 
      } 
     } 
    }); 

    if (ShareDialog.canShow(ShareLinkContent.class)) { 

     // get a screenshot 
     Bitmap image = getScreenshot(); 

     SharePhoto photo = new SharePhoto.Builder() 
       .setBitmap(image) 
       .setCaption(getResources().getString(R.string.shareBodyText)) 
       .build(); 

     SharePhotoContent content = new SharePhotoContent.Builder() 
       .addPhoto(photo) 
       .build(); 

     mShareDialog.show(content); 
    } 

그래서 왜 페이스 북의 응용 프로그램이 "publish_actions"없이 설치되어있는 경우 페이스 북 작동하지 않을 때 작동합니까 앱이 설치되지 않았습니까?

답변

-1

SharePhotoContent의 요구 사항이므로 사진을 공유하려면 기본 facebook 응용 프로그램을 설치해야합니다.

Facebook Docs에서

사진

사람들이 공유 대화이나 사용자 정의 인터페이스와 페이스 북 앱에서 사진을 공유 할 수 있습니다.

  • 사진은
  • 사람들이 설치된 안드로이드 앱 버전의 네이티브 페이스 북을 필요로 12MB 크기보다 작아야합니다 7.0 이상
관련 문제