How can implement Feed Dialog from Facebook in Android Application?

在这里输入图像描述 Implementation of Feed Dialog for 'Publish Story' in my Android App is not working. I downloaded the sample Facebook Android-sdk from the following link :

https://github.com/facebook/facebook-android-sdk/blob/master/README.md#dialogs

In case of simple wallPost, my AppId is working.. but when I am using this for 'Publish Story' Feed dialog, I am getting this message after Log In: An error occurred with RomeFoodieGuide. Please try again later.

Even in web browser, I am getting the same Error message. Is there any work to do to AppId in my App..?

In web browser I am using the link as follows : https://www.facebook.com/dialog/feed?app_id=118611694896804&redirect_uri=http://www.example.com/response/

In my App, I using the following link : "https://m.facebook.com/dialog/feed?app_id=123050457758183&redirect_uri=http://www.example.com/response/&display=touch"


    facebook=your facebbook object;
    Bundle parameters = new Bundle();
    parameters.putString("description", "description about link");
    parameters.putString("picture","link of picture your want add with share post.");
    parameters.putString("link", "Link you want to share");
    parameters.putString("name","Name of link");
    parameters.putString("caption","describe your caption text");


    facebook.dialog(context,"feed",parameters,new DialogListener() {

        @Override
        public void onFacebookError(FacebookError arg0) {
        //Display your message for facebook error   

        }

        @Override
        public void onError(DialogError arg0) {
        //Display your message for error    

        }

        @Override
        public void onComplete(Bundle arg0) {
        //Display your message on share scuccessful

        }

        @Override
        public void onCancel() {
        //Display your message on dialog cancel

        }
    });

I'm also working on that sample fb example, we have to do some thing on that sample code on mFacebook.dialog(Main.this, "feed", new SampleDialogListener()); by using this hope it helps you.. one more thing I have tried this old fb implementation code does't worked for me (may be it's for earlier fb ver)


You do not need to explicitly provide the feed dialog URL. You can use the SDK to display dialog. Refer to https://developers.facebook.com/docs/reference/androidsdk/ for more information.

链接地址: http://www.djcxy.com/p/49606.html

上一篇: 在墙上的对话框立即消失

下一篇: 如何在Android应用程序中实现来自Facebook的Feed对话框?