Facebook PHP抛出异常“(#803)您请求的某些别名不存在” [英] Facebook PHP throwing exception "(#803) Some of the aliases you requested do not exist"

查看:197
本文介绍了Facebook PHP抛出异常“(#803)您请求的某些别名不存在”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有效和经过身份验证的用户,但是当我们的PHP网页应用程序发布到他们的墙上时,它返回:

I have a valid and authenticated user, but when posting to their wall from our PHP web app it returns:

致命错误:未捕获OAuthException: #803)您请求的某些别名不存在:xxxxxxxxxxxxx,name:xxxxxxx

我有24个其他用户可以发布没有问题。我可以看到用户存在,方法是转到 https://graph.facebook.com/xxxxxxxxxxxxx

I have 24 other users that can post with no issues. And I can see the user exists by going to https://graph.facebook.com/xxxxxxxxxxxxx

这是代码:

    $fb_user_id = $row[0]; // loaded from DB
    $facebook_token = $row[1]; // loaded from DB

    $result = $facebook->api('/' . $fb_user_id. '/feed/',
                                'post',
                                array('access_token' => $facebook_token,
                                    'message' => $postMessage,
                                    'name' => 'Product name',
                                    'caption' => 'Accomplished!',
                                    'link' => 'http://www.xxxxxxx.com/',
                                    'description' => $postMessage,
                                    'picture' => 'http://www.xxxxxxx.com/images/productImage.png'));

Facebook API认为此用户不存在的任何想法?

Any ideas why the Facebook API thinks this user does not exist?

推荐答案

我有这个问题,后来我意识到我正在将数据库中的uid保存为 integer 但是,新的Facebook个人资料有很长的时间,例如: 100004409446248 ,这不是一个值,我可以保存为整数在我的mysql数据库中,我将其更改为将其视为 varchar ,所以现在没有问题

I had this issue, later I realised I was saving the uid in my database as an integer, however, new facebook profiles have very long uids, such as : 100004409446248, this was not a value I could save as an integer in my mysql database, I changed this to treat it as a varchar, so now there's no issue

这篇关于Facebook PHP抛出异常“(#803)您请求的某些别名不存在”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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