CakePHP Facebook插件(webtechnick)只'share'工作 [英] CakePHP Facebook plugin (webtechnick) only 'share' working

查看:130
本文介绍了CakePHP Facebook插件(webtechnick)只'share'工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我的CakePHP 1.3.10应用程序从webtechnick的Facebook插件。我已按照所有说明安装并拥有所有功能:

I'm trying to use the Facebook plugin from webtechnick with my CakePHP 1.3.10 app. I've followed all the directions to install it and have all the functionalities available:


  • 已下载的软件包并安装在 app / plugins / facebook

  • 使用应用程式的ID,金钥和秘密号码建立 app / config / facebook.php li>
  • 在我的 app_controller.php

  • $ helpers = array('Facebook.Facebook') >回传了我的布局中的 $ this-> Facebook-> html()函数
  • 回显了 $ this- >

  • Downloaded package and installed in app/plugins/facebook
  • Created app/config/facebook.php with my app's id, key and secret numbers, based on the example config file
  • Included $helpers = array('Facebook.Facebook') in my app_controller.php
  • Echoed the $this->Facebook->html() function in my layout (replcing the default html tag)
  • Echoed the $this->Facebook->init() function at the bottom of the layout, before

之前的布局底部的>然后,我在我的视图中使用这个代码:

Then, I use this code in my view:

echo $this->Facebook->share('link'); 
echo $this->Facebook->like();   
echo $this->Facebook->comments();

但我只得到分享按钮,不是类似或评论。我缺少任何步骤吗?如果我回显某些东西在facebook帮助 like()函数例如,它打印在视图中,所以它实际上是调用该函数,但不生成facbook元素。有任何想法吗?我不知道还有什么要尝试,我相信我已经遵循了所有的步骤...

But I only get the share button, not the like or comments. Am I missing any step? If I echo something inside the facebook helper like() function for example, it prints in in the view, so it's actually calling the function, but not generating the facbook element. Any ideas? I don't know what else to try, I believe I've followed all the steps...

---------- UPDATE --------------------------

使用Firebug我看到此脚本错误: FB.provide 不是函数

With Firebug I see this script error: FB.provide is not a function

错误源自的文件是 http://connect.facebook.net/es_ES/all.js ,我假设插件调用它。但是,由于它在Facebook的服务器,我能做什么呢?这是否意味着他们有一个问题?我看不到更多的事情,我可以做到我的结束。有任何想法吗?

The file where the error comes from is http://connect.facebook.net/es_ES/all.js, which I assume the plugin calls it. But since it's in Facebook's servers, what can I do about it? Does that mean there's a problem on their end? I don't see many more things I can do in my end. Any ideas?

推荐答案

将facebook目录放入app / plugins目录,并将facebook.php从facebook目录的config文件夹放入app / config文件夹我相信您的问题会立即得到解决。

Put facebook directory into the app/plugins directory and put facebook.php from config folder of facebook directory into app/config folder and I am sure your problem will get solve immediately.

感谢

这篇关于CakePHP Facebook插件(webtechnick)只'share'工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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