Zen Follower
- Join Date:
- Jul 2008
- Posts:
- 106
- Plugin Contributions:
- 0
AutoFacebook [Support]
I was also curious about what triggers the mod to make a post on FB?
If you add products via Easy Populate will it trigger the mod?
Views: 141,424
Zen Follower
I was also curious about what triggers the mod to make a post on FB?
If you add products via Easy Populate will it trigger the mod?
Zen Follower
VisExp:
I have installed it and it seems to be working fine with one exception. I uploaded a test product to my website and the mod generated a post on my facebook page. The only problem is the post was generated on my personal facebook page and not on my business fan page.
This could be due to any number of things missed in the installation.
I would remove the Application from your fan page (you can do this from your applications page) go back and repeat the tutorial starting at step 8. (http://htmyell.com/autofacebook-for-zen-cart/)
also
@VisExp the mod uses the facebook api and jquery to make the calls, you could (in theory) copy the code and (if needed) adjust the paths to the php folder and use it with Easy Populate if you know what vars they're using etc, however I don't know anything about Easy Populate, and if you arent sure what you're doing I wouldnt advise it.
@deathman2006: thanks for letting us know. Glad to hear it.
Jamie Taylor
Htmyell Web Design and Development
Zen Follower
jamielife:
This could be due to any number of things missed in the installation.
I would remove the Application from your fan page (you can do this from your applications page) go back and repeat the tutorial starting at step 8. (http://htmyell.com/autofacebook-for-zen-cart/)
also
- make sure the $user_id in steps 11 and 18 are set to the id of your facebook fan page.
- make sure you add your application to your fan page (step 13)
and- that you install the application to your fan page. (steps 14-16).
@VisExp the mod uses the facebook api and jquery to make the calls, you could (in theory) copy the code and (if needed) adjust the paths to the php folder and use it with Easy Populate if you know what vars they're using etc, however I don't know anything about Easy Populate, and if you arent sure what you're doing I wouldnt advise it.
@deathman2006: thanks for letting us know. Glad to hear it.
Thanks for the reply :D
I deleted the applications and started again. I figured out what I was doing wrong. A while back I had changed my FB to the name of my business instead of a number (when they offered the option of vanity URL's). I was using that name instead of the number as the user_id
Once I changed that to the number everything worked fine.
Thank you again for the mod and for your help with it :clap:
New Zenner
It is not showing price or discription on Facebook. Any one know how to fix this?
Zen Follower
So everything else works? Products name? the image is showing up on FB? etc?
For the price you could try changing line 144 (of update_product.php in admin/includes/modules) where you see:
$price = $products_price;
to:
$price = $_POST["products_price"];
As for the discription, I'm not sure. Are there any special characters in the discription?
Maybe try changing line 147 where you see:
$prod_description = implode(" ", $_POST['products_description']);
to:
$prod_description = $sql_data_array["products_description"];
Let me know if that helps
Jamie Taylor
Htmyell Web Design and Development
New Zenner
Ive tried that and it didnt work for me either :(
I still dont get the price on FB
Also going back to the problem of posts on both the business and personal fb walls, how do you make it post only on the business page?
Clever AV Ltd
http://www.cleveravltd.co.uk
ZenCart 1.3.9g
Zen Follower
Working on the price/description problem now.
@deathman2006: it should only be posting to your business page. When testing I noticed if i didnt perform steps 13, 14, or 16 properly I would end up with mixed up personal/business pages. Also make sure you are using your business page's id for $user_id in both edited php files.
Jamie Taylor
Htmyell Web Design and Development
Totally Zenned
Just wanted to say thanks for the very nicely put together add-on And the very complete step-by-step how-to. Worked like a charm!
Zen Follower
Well thanks, I'm glad you liked it :)
Jamie Taylor
Htmyell Web Design and Development
Totally Zenned
Question: One of my carts is a Zen version 1.3.6. Do you know of any reason why this add-on might not function with it?
Thanks
Zen Follower
Well I can't say for sure, as I started zen cart @ 1.3.8, but in theory the code isn't that integrated to the new versions. You might have to find some variable names, but maybe not.
I wouldnt overwrite the existing update_product.php, instead copy the AutoFacebook code into it.
pm me the code for the existing file if need be.
Jamie Taylor
Htmyell Web Design and Development
New Zenner
Hi Jamie
I was going to PM you my update_product.php to see if you could see why it is not posting price and description. But you have your PMs on not allowed.
I added the code below to my update_product.php as it has been modified. Is there anything else I need to add?
//AutoFacebook
$store_name = "My Store"; // store name i.e. "Mary's Car Shop", or "MikesCupcakes.com."
$store_url = 'http://www.mystore.co.uk'; //path to your store without the trailing "/"
$cur = '£'; //change to your currency symbol. Assumes symbol come in front of numbers
$new_message = "New Product!"; // change to whatever or leave the same. i.e "New Cupcake!"
//your facebook developer app info.
$appapikey = 'mykey';
$appsecret = 'mysecret';
$user_id = 'myid'; //id of your facebook store page
$infinite_session_key = 'Mysessionkey'; //from facebook app
// No Need to edit below here.
$prod_image = $store_url . "/images/" . $_POST['products_image'];
$price = $products_price;
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id;
$prod_name = implode(" ", $_POST['products_name']);
$prod_description = implode(" ", $_POST['products_description']);
include_once 'facebook/php/facebook.php';
$facebook = new Facebook($appapikey, $appsecret);
$facebook->api_client->user = $user_id;
$facebook->api_client->session_key = $infinite_session_key;
$facebook->api_client->expires = 0;
$attachment = array(
'name' => $prod_name,
'href' => $prod_url,
'caption' => 'Price: '. $cur . $price,
'description' => $prod_description,
'media' => array(array('type' => 'image',
'src' => $prod_image,
'href' => $prod_url)));
$action_links = array(
array('text' => $store_name,
'href' => $store_url));
$attachment = json_encode($attachment);
$action_links = json_encode($action_links);
$facebook->api_client->stream_publish($new_message, $attachment, $action_links);
//end of autoFacebook
Totally Zenned
jamielife:
Well I can't say for sure, as I started zen cart @ 1.3.8, but in theory the code isn't that integrated to the new versions. You might have to find some variable names, but maybe not.
I wouldnt overwrite the existing update_product.php, instead copy the AutoFacebook code into it.
pm me the code for the existing file if need be.
Concerning Zen version 1.3.6: Using Winmerge I merged the two update_product.php. Everything seems to be working fine except that the product image is missing. Any idea what that may be an indication of?
Thanks
Zen Follower
@meltdown let me see the code. pm's should be on now.
Anyway this price issue is baffling me. It works fine on my end everywhere i try it. For those who aren't seeing price, what does it look like on facebook? Are you seeing the dollar sign '$' and then nothing? are you seeing 'Price: ' and then nothing?
Jamie Taylor
Htmyell Web Design and Development
New Zenner
Hi jamielife
Want to say thanks for the mod.
Ifigured out the reason mine was posting to both my personal and business pages was because id selected both users and pages in the app settings lol
As for the price issue, im not getting anything show on facebook other than the image and the model name
Clever AV Ltd
http://www.cleveravltd.co.uk
ZenCart 1.3.9g
Zen Follower
deathman2006:
As for the price issue, im not getting anything show on facebook other than the image and the model name
But is that on purpose?
Jamie Taylor
Htmyell Web Design and Development
New Zenner
No, id like the price too, dont want the description but would like the price
Clever AV Ltd
http://www.cleveravltd.co.uk
ZenCart 1.3.9g
New Zenner
Hi Jamie,
I am trying to install autofacebook.
I am using 1.39b
All goes fine until I get to the page where it says Click Here to allow your page all permissions to your app.
Every time I click this it doesn't go anywhere and stays on that page so I dont get my infinite key and can't complete the install.
Any ideas what I am doing wrong?
Cheers
Paul
Zencart Sites Built:
Zen Follower
skipper_2:
Hi Jamie,
I am trying to install autofacebook.
I am using 1.39b
All goes fine until I get to the page where it says Click Here to allow your page all permissions to your app.
Every time I click this it doesn't go anywhere and stays on that page so I dont get my infinite key and can't complete the install.
Any ideas what I am doing wrong?Cheers
Paul
It might be face book... what happens after you click the 'step 2' link? Ive noticed facebook is going through a lot of problems right now. I kept getting redirected to a black page in recent tests... if i clicked the empty (black) screen it would move forward. If you ever get to look at the facebook forums you'll see that just about every developer is extremely annoyed with facebook right now. They moved to their "open graph" platform without telling anyone (so that we could adjust our scripts) and now everythings breaking right and left. and the worst part is their new API (that was supposed to be a "renewed support for developers" or whatever) is incomplete and totally undocumented. Anyway (make sure you followed the steps in this forum) try again later, and i'll look into it tomorrow or sunday.
Jamie Taylor
Htmyell Web Design and Development
Zen Follower
First of all, thanks a lot for this great contribution, i'm sure more and more store owners will use it in the future.
I have just finished installing it and it works great, except 2 little details:
Tell staff why this post should be reviewed.