2

我有一个使用 facebook 积分的应用程序。我动态创建项目信息,如标题、描述和价格,但它给出了“项目信息:未指定描述”或“无效价格”等错误。我查找日志并查看所有字段数据都正常。我的代码如下。有人有建议吗?

    $memcache                   = GetConnectMemcache();
    $cacheKey                   = 'myKey_' . $_REQUEST['buyer'];
    $data                       = $memcache -> get($cacheKey);


    $item['title']          = $data['title'];
    $item['description']        = $data['description']; 
    $item['price']          = (int)$data['price'];      
    $item['image_url']      = $data['image_url'];           
4

1 回答 1

0

您目前将 data['description'] 设置为什么值?

你能用硬编码的值试试下面的这个例子吗?如果可行?

 $item['title'] = 'BFF Locket';
 $item['price'] = 1;
 $item['description'] = 'This is a BFF Locket...';
 $item['image_url'] = 'http://www.facebook.com/images/gifts/21.png';
 $item['product_url'] = 'http://www.facebook.com/images/gifts/21.png';

让我知道您在硬编码时看到的行为,然后我们可以更轻松地调试问题。

于 2011-07-26T18:28:22.123 回答