0

我成功地将 facebook 与我的 android 应用程序集成,但是现在当我启动我的应用程序然后单击共享按钮,我看到 Facebook Webview 以印地语语言出现。我无法理解。任何帮助都将是可观的。

我的代码:-

private void publishFeedDialog() {
    Bundle params = new Bundle();
    params.putString("name", "sdfs");
    params.putString("caption", "dsasd");
    params.putString("description", "dadads");

    Session activeSession = Session.getActiveSession();

    WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this, activeSession, params))
            .setOnCompleteListener(new OnCompleteListener() {
                @Override
                public void onComplete(Bundle values, FacebookException error) 
                {
                    if (error == null) 
                    {
                        // When the story is posted, echo the success
                        // and the post Id.
                        final String postId = values.getString("post_id");
                        if (postId != null) 
                        {
                            Toast.makeText(MainActivity.this, "Posted story, id: "+postId, Toast.LENGTH_SHORT).show();
                        } 
                        else 
                        {
                            // User clicked the Cancel button
                            Toast.makeText(MainActivity.this.getApplicationContext(), "Publish cancelled", Toast.LENGTH_SHORT).show();
                        }
                    }
                    else if (error instanceof FacebookOperationCanceledException) 
                    {
                        // User clicked the "x" button
                        Toast.makeText(MainActivity.this.getApplicationContext(), "Publish cancelled", Toast.LENGTH_SHORT).show();
                    }
                    else
                    {
                        // Generic, ex: network error
                        Toast.makeText(MainActivity.this.getApplicationContext(), "Error posting story", Toast.LENGTH_SHORT).show();
                    }
                }
            }).build();

    feedDialog.show();
}
4

0 回答 0