2
votes

I have set up the facebook plugin like the instructions.

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

I run this code:

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

If I go to: http://myhomepage.com it works but if I go to the same with HTTPS I just get a text share. In IE 10 and Chrome I get a Not safe content error. If I accept it it works.

How do I run it over SSL? I have bought the certificate, so it is valid and not a home-made self-signed one. I am running Cake PHP version 2.

I have tried to search the web, but I just find problems with the login function and not with the share button.

1
Hi! I manage to solve it. Maybe not the best solution, but it works for the moment. First I edit FacebookHelper line 22: public $__fbShareScript = 'myhomepage.com/FB.Share.php'; Then i created on file: myhomepage.com/FB.Share.php <?php $handle = @fopen("static.ak.fbcdn.net/connect.php/js/FB.Share", "r"); if ($handle) { while (($buffer = fgets($handle, 4096)) !== false) { echo $buffer; } if (!feof($handle)) { echo "Error: unexpected fgets() fail\n"; } fclose($handle); } ?> - Jesper Bergman
If I look into the sourcecode. I now get: <a href="facebook.com/sharer.php" share_url="example.com/url_to_share" type="button" name="fb_share">share</a><script type="text/javascript" src="myhomepage.com/FB.Share.php"></script> - Jesper Bergman

1 Answers