在授权facebook权限后,如果apk已签名,则facebook不会打开

时间:2013-03-29 12:03:26

标签: android facebook andengine

当我创建一个未签名的apk后,我接受了在facebook上发布对话框后的权限但是如果我在接受权限后签署apk发布什么也没做。它能是什么?

我正在使用andegine。

如果我卸载Facebook移动应用程序,如果它可以工作,有没有办法告诉我的应用程序不使用?

    public void facebookLogin(final String mensaje, final String caption) 
{       
    Session.openActiveSession(this, true, new Session.StatusCallback() 
    {   
        @Override
        public void call(Session session, SessionState state, Exception exception) 
        {
            if (session.isOpened()) 
            {
                Request.executeMeRequestAsync(session, new Request.GraphUserCallback() 
                {
                        @Override
                        public void onCompleted(GraphUser user, Response response) 
                        {                               
                            if (user != null) 
                            {                                                                       
                                facebookFeedDialog(mensaje, caption);
                            }
                        }
                });
            }               
        }
    });
}

public void facebookFeedDialog(String message, String caption) 
{       
    Bundle params = new Bundle();
    params.putString("name", "My Application");
    params.putString("caption", caption);
    params.putString("description", message);
    params.putString("link", "https://play.google.com/store/apps/details?id="+this.getApplication().getPackageName().toString());
    params.putString("picture", "XXXXX");       

    WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this, Session.getActiveSession(), params)).setOnCompleteListener(new OnCompleteListener() {
            @Override
            public void onComplete(Bundle values, FacebookException error) 
            {
                touchHabilitado = true;
                if (error == null) 
                {
                    final String postId = values.getString("post_id");
                    if (postId != null) 
                    {
                        // POSTED
                        toast("OK");
                    } 
                    else 
                    {
                        // POST CANCELLED
                        //toast("cancel 1");
                    }
                } 
                else if (error instanceof FacebookOperationCanceledException) 
                {
                    // POST CANCELLED
                    //toast("cancel 2");
                } 
                else 
                {
                    // ERROR POSTING
                    toast(error.getMessage());
                }                                      
           }         
    }).build();
    feedDialog.show();
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {     

        super.onActivityResult(requestCode, resultCode, data);
        Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);       
}

0 个答案:

没有答案