OAuthException当试图发布到留言板 [英] OAuthException when trying to Post to Friends Wall

查看:95
本文介绍了OAuthException当试图发布到留言板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林有很多麻烦尝试后使用Android中Facebook的API一个朋友的墙上。这是我目前所面对的:

 如果(facebook.isSessionValid()){
                        字符串的响应= facebook.request((用户ID == NULL)我:用户ID);                        捆绑PARAMS =新包();
                        params.putString(信息,把信息在这里);
                        params.putString(链接,http://mylink.com);
                        params.putString(标题,{*演员*}刚刚发布此!);
                        params.putString(说明,我的链接描述点击链接了解更多。);
                        params.putString(名,这个环节的名字!);
                        params.putString(图片,http://mysite.com/picture.jpg);                        响应= facebook.request(((用户ID == NULL)我:用户ID)+/饲料,则params,POST);                        Log.d(测试,响应);
                        如果(响应==空|| response.equals()||
                                response.equals(假)){
                            Log.v(错误,空白响应);
                        }
                    }其他{
                        //没有登录,所以重新登录
                        Log.d(1234567890,sessionNOTValid,重新登录);                    }
                }赶上(例外五){
                    e.printStackTrace();
                }

但这个返回这个错误:

  12-11 21:34:06.604:D / FACEBOOK RESPONSE(14954):{错误:{消息:(#200)饲料的故事发布到其他用户:OAuthException,code:200}}此应用程序,类型被禁用


解决方案

您可能创造最近这个Facebook应用程序,这意味着2013年2月中断更改已启用。

二月份的最新更改包括:


  

删除通过图形API张贴到墙上朋友的能力。


  
  

我们将删除通过图形API发布到用户的朋友的墙壁的能力。具体来说,反对[USER_ID] /饲料,其中[USER_ID]从会话用户,或在target_id用户从会话用户不同stream.publish调用不同的岗位,就会失败。如果你想要让人们张贴到他们的朋友的时间表,调用饲料对话框。故事,包括通过用户的朋友提到标记或标记的行动上会显示好友的时间轴(假定朋友批准标签)。欲了解更多信息,请参阅本博客文章。


我们正在禁用此功能在2月开始,如果你想启用它(只是暂时的,直到2月)去你的应用信息中心>设置>高级>禁用2013年2月的重大更改

我强烈建议不要但是这样做,因为二月份开始该功能将使您的应用程序再次抛出同样的错误。

Im having alot of trouble trying to post to a friends wall using the Facebook api in Android. This is what I have at the moment:

if (facebook.isSessionValid()) {
                        String response = facebook.request((userID == null) ? "me" : userID);

                        Bundle params = new Bundle();
                        params.putString("message", "put message here");
                        params.putString("link", "http://mylink.com");    
                        params.putString("caption", "{*actor*} just posted this!");
                        params.putString("description", "description of my link.  Click the link to find out more.");
                        params.putString("name", "Name of this link!");
                        params.putString("picture", "http://mysite.com/picture.jpg");

                        response = facebook.request(((userID == null) ? "me" : userID) + "/feed", params, "POST");       

                        Log.d("Tests",response);
                        if (response == null || response.equals("") || 
                                response.equals("false")) {
                            Log.v("Error", "Blank response");
                        }
                    } else {
                        // no logged in, so relogin
                        Log.d("1234567890", "sessionNOTValid, relogin");

                    }
                }catch(Exception e){
                    e.printStackTrace();
                }

But this returns with this error:

12-11 21:34:06.604: D/FACEBOOK RESPONSE(14954): {"error":{"message":"(#200) Feed story publishing to other users is disabled for this application","type":"OAuthException","code":200}}

解决方案

You probably created this Facebook application recently, which means the February 2013 breaking changes are enabled.

February's Breaking Changes include:

Removing ability to post to friends walls via Graph API

We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail. If you want to allow people to post to their friends' timelines, invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag). For more info, see this blog post.

We are disabling this feature starting in February, if you wish to enable it (only temporarily until February), go to your app dashboard > Settings > Advanced > Disable "February 2013 Breaking Changes"

I highly recommend against doing so, however, since starting February this functionality will cause your app to throw the same error again.

这篇关于OAuthException当试图发布到留言板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆