-
Re: AutoFacebook [Support]
I looked at the code again in update_products and noticed that you put the first line of my code in the wrong spot, it was inside the
PHP Code:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
so this was never being run
PHP Code:
$facebook_add = $_POST['facebook_add'];
Try the new file and see if it finally works.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
lankeeyankee
I looked at the code again in update_products and noticed that you put the first line of my code in the wrong spot, it was inside the
PHP Code:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
so this was never being run
PHP Code:
$facebook_add = $_POST['facebook_add'];
Try the new file and see if it finally works.
We have lift-off Houston = Success = works a treat !!!
Thanks again - now we will see if we can make this available for everyone :)
So what other contributions have you put forward Lankee? - you mentioned something earlier.
cheers,
Mike
-
Re: AutoFacebook [Support]
If you bundle up your work and submit it as a new version to
http://www.zen-cart.com/downloads.php?do=file&id=1095
then everyone will have access to it.
-
Re: AutoFacebook [Support]
Does anyone know how to show up the product price together with special price in facebook page?
Thank you very much!
-
Re: AutoFacebook [Support]
Hi there,
I've had Auto Facebook working for quite a while now, but it seems like they've changed something :( So, I deleted my app and set up another one, but when I run the facebook_authorization.php script, I get the following error:
Strict Standards: Unknown: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in Unknown on line 0
Fatal error: Uncaught OAuthException: Malformed access token CAAFHflI18GsBALnTT9wyylUj72gs8RZB0RQcs83EJm3ZBC90RVeCEpjIECJu6lrvGXtpZCo8tjkH6lt rAZCQVv3NtejJLWQ9nYNTBgecYaDPs7OYa5TmJmYab0ziR69oiQLNFnUrVNC3jPQ934FWCQUb0VeFHos ZD&expires thrown in /home/joannes/public_html/facebook/facebook_authorization.php on line 532
I'm still using zencart 1.38 so it's nothing to do with a new version or anything - can anyone help?
Thanks,
Joanne :(
-
Re: AutoFacebook [Support]
I have been skimming through posts on here for the best part of 3 hours and have not found anyone with quite the same issue I'm having and I just don't have time to keep skimming through pages so, I apologize if this has been reported and solved already.
I managed to get this installed and working almost completely, lol!
When I make a new product and click "Insert", I get sent to a blank page. I have to send my browser back 3 pages to get back to my category page.
Now, unlike some of the guys here who say that when that happens, the product doesn't get posted on FB... mine does. So the process seems to be executing correctly, it's just not redirecting me back to the category after inserting a new product.
Any idea how to fix this? o.0
-
Re: AutoFacebook [Support]
blank page means a php error. Check your cache folder if on 1.3.9 or lowers or your logs folder on 1.5x. The debug text files have the info in them that will help track down what you've done wrong.
-
Re: AutoFacebook [Support]
I'm using autofacebook with zen 1.5.1
The plugin is working great except extra zeros are added to the prices like $949.00000
heres a link https://www.facebook.com/ntsolutionsllc?ref=hl
How do I get the plugin to include the discounted price and fix the zeros or just not include the price at all?
I also want to use the autotwitter plugin how do I install both plugins?
-
Re: AutoFacebook [Support]
I have installed the mod as per the youtube video yet when I run the facebook_auth file I get this:
Status: array (
0 => '
'"http://www.w3.org/1999/xhtml"
xml:lang',
2 => '"en" lang',
3 => '"en" id',
4 => '"facebook">
'"Content-Type" content',
6 => '"text/html; charset',
7 => 'utf-8" />
'"Cache-Control" content',
9 => '"no-cache" />
'"robots" content',
11 => '"noindex,nofollow" />
'"menu" href',
16 => '"http://www.facebook.com/">
'"core">
Sorry, something went wrong.
We\'re working on getting this fixed as soon as we can.
'"return back();" href', 19 => '"http://www.facebook.com/">Go Back
'"footer" id', 21 => '"pagefooter_copyright"> Facebook © 2013 · '"http://www.facebook.com/help/">Help
',
)
Any ideas?
Jayce
-
Re: AutoFacebook [Support]
That looks like a facebook message and facebook problem but if you have installed this wrong, perhaps that message would come up as well. Has anyone else seen this message?
-
Re: AutoFacebook [Support]
I followed the video to the letter, even watched it through once and then started it again and followed the steps, anyway though that's the error I get :(
-
Re: AutoFacebook [Support]
hmmm, took it out of Sandbox mode and put www in front of the URL and now I get this
{
"error": {
"message": "Invalid redirect_uri: Given URL is not permitted by the application configuration.",
"type": "OAuthException",
"code": 191
}
}
-
Re: AutoFacebook [Support]
It's ok I've sorted it - stupid STUPID mistake, when I copied and pasted the app id and secret to the php file there was a space at the start, deleted that and now it works fine
HOWEVER
when I post to facebook the product comes out with the price as £19.990 - how do I limit the decimal points?
-
Re: AutoFacebook [Support]
My facebook acc. has been login by someone! So I changed the password. But when I update the product information, it shows:
Facebook Error: Error validating access token: The session has been invalidated because the user has changed the password.
Does anyone could tell me how to fix it? Thanks in advance for your help!
-
Re: AutoFacebook [Support]
I have just installed this addon and uploaded the corrected file. When using i try to open the facebook_authorization.php file i get this error
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
I have changed the file with my token id etc exactly as shown in the youtube video. Is this something to do with face book developers site being slightly different now.
Any help on this matter would be heaps appreciated.
My website is www.toycave.com.au and im trying to upload my items to my facebook site. www.facebook.com/toycavebabytoys
I have only just set up my facebook and facebook page.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
lankeeyankee
I looked at the code again in update_products and noticed that you put the first line of my code in the wrong spot, it was inside the
PHP Code:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
so this was never being run
PHP Code:
$facebook_add = $_POST['facebook_add'];
Try the new file and see if it finally works.
Lankee I am having the same problem Can you explain "it was inside" WHAT
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
tenthilltoys
Lankee I am having the same problem Can you explain "it was inside" WHAT
It's supposed to come after the closing bracket so it should look like this:
PHP Code:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$facebook_add = $_POST['facebook_add'];
The other poster had it like this:
PHP Code:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
$facebook_add = $_POST['facebook_add'];
}
-
Re: AutoFacebook [Support]
Thankyou Lankee for your response and I apologize for being a bit terse but I had been working on this file for an hour.
I am still getting a white screen and I have double checked all of the code do you have any suggestions.
with thanks
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
tenthilltoys
Thankyou Lankee for your response and I apologize for being a bit terse but I had been working on this file for an hour.
I am still getting a white screen and I have double checked all of the code do you have any suggestions.
with thanks
No worries. Look in your error log to see what error(s) are occurring to give the white screen. It will be something simple. You can also post the code from that page here and I can look at it. Put it in between the
PHP Code:
php brackets from the toolbar of the message text editor
to make it easier to read.
-
Re: AutoFacebook [Support]
From update_product.php
PHP Code:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$facebook_add = $_POST['facebook_add'];
if (isset($_GET['pID'])) $products_id = zen_db_prepare_input($_GET['pID']);
PHP Code:
'products_price_sorter' => zen_db_prepare_input($_POST['products_price_sorter'])
'facebook_add' => zen_db_prepare_input($_POST['facebook_add'])
);
PHP Code:
//// INSERT PRODUCT-TYPE-SPECIFIC *INSERTS* HERE //////
if ($facebook_add == 1) {
//AutoFacebook
PHP Code:
$messageStack->add_session('Facebook Error: '.$fberror, 'error');
}
}
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* ////////
From preview_info.php
PHP Code:
p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max,
p.products_sort_order, p.facebook_add
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
PHP Code:
echo zen_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description;
}
?>
?>
<!--BO FACEBOOK-->
</tr><tr>
<td><hr></td>
</tr><tr>
<td class="smallText">
<?php
$facebook_add = $_POST['facebook_add'];
if ($facebook_add == 1) {
echo "Facebook Will be Updated.";
} else {
echo "Facebook Will NOT be Updated.";
}
?>
</td> </tr>
<tr>
<!--EO FACEBOOK-->
</td>
From collect_info.php
PHP Code:
'master_categories_id' => ''
'facebook_add' => ''
);
$pInfo = new objectInfo($parameters);
PHP Code:
p.products_price_sorter, p.master_categories_id, p.facebook_add
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
PHP Code:
default: $in_products_quantity_mixed = true; $out_products_quantity_mixed = false;
}
if (!isset($pInfo->facebook_add)) $pInfo->facebook_add = '0';
switch ($pInfo->facebook_add) {
case '0': $is_facebook_add_enabled = false; $not_facebook_add_enabled = true; break;
case '1': $is_facebook_add_enabled = true; $not_facebook_add_enabled = false; break;
default: $is_facebook_add_enabled = false; $not_facebook_add_enabled = true;
}
// set image overwrite
PHP Code:
<td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main">Add/update Facebook?</td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_radio_field('facebook_add', '1', $is_facebook_add_enabled) . ' Yes ' . zen_draw_radio_field('facebook_add', '0', $not_facebook_add_enabled) . ' No ' . ($pInfo->facebook_add == 1 ? 'Add to facebook?' : ''); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_PRODUCT_IS_FREE; ?></td>
when I use this the product screen in admin goes blank.
I used the cut and paste method to do this.
any help please.
Peter
-
Re: AutoFacebook [Support]
From my code posted before:
In admin/includes/modules/product/collect_info.php around line 41 look for this line
PHP Code:
'master_categories_id' => ''
and change it to
PHP Code:
'master_categories_id' => '',
'facebook_add' => ''
You have left out the comma after 'master_categories_id' => ''
And again, you left out the comma here in update_products:
PHP Code:
'products_price_sorter' => zen_db_prepare_input($_POST['products_price_sorter']),
'facebook_add' => zen_db_prepare_input($_POST['facebook_add'])
When changing code you should just replace the entire snippet instead of trying to insert only the new code so you don't forget to miss the little things like commas.
-
Re: AutoFacebook [Support]
Thankyou very much for your help got it all working on the spare site now to see how we go on the main site.
Kind Regards
Peter
-
Re: AutoFacebook [Support]
I am having this same issue.. Did not see where anyone posted a solution but went to your fb page and see you have it working correctly.. Could you please share how you fixed this issue?
Thank you
Arlette
Quote:
I'm using autofacebook with zen 1.5.1
The plugin is working great except extra zeros are added to the prices like $949.00000
heres a link
https://www.facebook.com/ntsolutionsllc?ref=hl
How do I get the plugin to include the discounted price and fix the zeros or just not include the price at all?
I also want to use the autotwitter plugin how do I install both plugins?
-
Re: AutoFacebook [Support]
likely a dumb question - I have used a few versions of AutoFacebook so not sure which plugin has the feature which allows you to say yes update or no do not update Facebook when you add a new product or modify a new product. Any help will be appreciated. I am using v1.3.9h
cheers,
Mike
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
shags38
likely a dumb question - I have used a few versions of AutoFacebook so not sure which plugin has the feature which allows you to say yes update or no do not update Facebook when you add a new product or modify a new product. Any help will be appreciated. I am using v1.3.9h
cheers,
Mike
I was right - it was a dumb question - I cleared the fog in my brain and remembered that LankeeYankee had sorted this out for me previously - thanks Yankee :smile:
-
Re: AutoFacebook [Support]
Hi Yankee - like a few others I'd like to know how to limit the number of decimal points showing in the price when Facebook is updated - I think it is a Zen Cart thing (as against an AutoFacebook thing) as when updating a product it is showing as 4 digits after the decimal point instead of 2 in the net price window on the product page - if I remember to remove the two extra digits before hitting update it works fine but it is difficult to keep remembering that when doing a lot of product maintenance.
Any help is appreciated.
cheers,
Mike
-
Re: AutoFacebook [Support]
Mike - look in the downloads section for a new revision that fixes this issue. I just installed it and it works GREAT!!
Now I just want to figure out how to implement the code in this thread to put a "switch" on the product page so things are only posted if you click that switch.
Quote:
Originally Posted by
shags38
Hi Yankee - like a few others I'd like to know how to limit the number of decimal points showing in the price when Facebook is updated - I think it is a Zen Cart thing (as against an AutoFacebook thing) as when updating a product it is showing as 4 digits after the decimal point instead of 2 in the net price window on the product page - if I remember to remove the two extra digits before hitting update it works fine but it is difficult to keep remembering that when doing a lot of product maintenance.
Any help is appreciated.
cheers,
Mike
-
Re: AutoFacebook [Support]
Hi Judy,
Quote:
Originally Posted by
stellarweb
Mike - look in the downloads section for a new revision that fixes this issue. I just installed it and it works GREAT!!
What revision? a revision of AutoFacebook or some other plugin? can you elaborate please as I am keen to get this fixed.
Quote:
Now I just want to figure out how to implement the code in this thread to put a "switch" on the product page so things are only posted if you click that switch.
So do you need help with this or was this just a comment :) ? I have it working beautifully on the product info page, update facebook yes or no radio button.
cheers,
Mike
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
shags38
Hi Judy,
What revision? a revision of AutoFacebook or some other plugin? can you elaborate please as I am keen to get this fixed.
So do you need help with this or was this just a comment :) ? I have it working beautifully on the product info page, update facebook yes or no radio button.
cheers,
Mike
Mike - I downloaded the latest version of AutoFacebook that came out a few days ago that fixes the decimal point issue.
http://www.zen-cart.com/downloads.php?do=file&id=1095
It took just a few minutes to get the radio button working - very slick! I think it needs to be packaged up and added to the mod! It is definitely something the mod needs. :smile:
-
2 Attachment(s)
Re: AutoFacebook [Support]
Hi,
I need help.
I have used autofacebook plug-in to upload the products information to facebook, but the pictures on facebook are completely inconformity from the website. The facebook has resized the pictures a lot and the pictures looks very twisted.
facebook info:
Attachment 13350
Product info:
Attachment 13351
how to fix?
-
Re: AutoFacebook [Support]
Guys, Is anybody there having the same problem I have ? After I installed the plugin, I wanted to test it, so I added a test product to see if it will be updated on facebook, but after I added the new product then preview > update >> Oops .. then I got a blank page ! why is that ? the logs shows those errors :
[25-Dec-2013 04:23:32] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/public_html/newadmin/includes/modules/update_product.php:1) in /home1/public_html/newadmin/includes/functions/general.php on line 21
I'm using zc v.1.5.1 on Firefox,Google chrome, IE !! Please help ..
-
Re: AutoFacebook [Support]
Hi
I have just installed the Numinix product fields into my store. I am having trouble with the collect info as I have it modified for Auto Facebook (works fine) when getting to the product>XXX>XXXX screen it goes blank.
Is anyone using this combination of Modules.
I have been over both files and cannot see any mistakes as I merged these files.
Thanks
Peter
-
Re: AutoFacebook [Support]
I am having the same problem, has anyone replied to your post about this yet?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
alhakeem2001
Guys, Is anybody there having the same problem I have ? After I installed the plugin, I wanted to test it, so I added a test product to see if it will be updated on facebook, but after I added the new product then preview > update >> Oops .. then I got a blank page ! why is that ? the logs shows those errors :
[25-Dec-2013 04:23:32] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/public_html/newadmin/includes/modules/update_product.php:1) in /home1/public_html/newadmin/includes/functions/general.php on line 21
I'm using zc v.1.5.1 on Firefox,Google chrome, IE !! Please help ..
Ok so I just installed this mod tonight and was having the same issue. To fix it download a copy of your back up of the admin-->includes-->modules-->update_product.php file then use Winmerge to merge the copy of the modules update_product.php file, save the new file and make the changes to the mod information and upload it to your server (replace the old file) and it should work.
Not sure if I have other mods that have updated this file but here is a copy of the merge I made or rather here is the code to replace the old file with
Code:
<?php
/**
* @package admin
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: update_product.php 18695 2011-05-04 05:24:19Z drbyte $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (isset($_GET['pID'])) $products_id = zen_db_prepare_input($_GET['pID']);
if (isset($_POST['edit_x']) || isset($_POST['edit_y'])) {
$action = 'new_product';
} elseif ($_POST['products_model'] . $_POST['products_url'] . $_POST['products_name'] . $_POST['products_description'] != '') {
$products_date_available = zen_db_prepare_input($_POST['products_date_available']);
$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';
// Data-cleaning to prevent MySQL5 data-type mismatch errors:
$tmp_value = zen_db_prepare_input($_POST['products_quantity']);
$products_quantity = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['products_price']);
$products_price = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['products_weight']);
$products_weight = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['manufacturers_id']);
$manufacturers_id = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$sql_data_array = array('products_quantity' => $products_quantity,
'products_type' => zen_db_prepare_input($_GET['product_type']),
'products_model' => zen_db_prepare_input($_POST['products_model']),
'products_price' => $products_price,
'products_date_available' => $products_date_available,
'products_weight' => $products_weight,
'products_status' => zen_db_prepare_input((int)$_POST['products_status']),
'products_virtual' => zen_db_prepare_input((int)$_POST['products_virtual']),
'products_tax_class_id' => zen_db_prepare_input((int)$_POST['products_tax_class_id']),
'manufacturers_id' => $manufacturers_id,
'products_quantity_order_min' => zen_db_prepare_input($_POST['products_quantity_order_min']),
'products_quantity_order_units' => zen_db_prepare_input($_POST['products_quantity_order_units']),
'products_priced_by_attribute' => zen_db_prepare_input($_POST['products_priced_by_attribute']),
'product_is_free' => zen_db_prepare_input((int)$_POST['product_is_free']),
'product_is_call' => zen_db_prepare_input((int)$_POST['product_is_call']),
'products_quantity_mixed' => zen_db_prepare_input($_POST['products_quantity_mixed']),
'product_is_always_free_shipping' => zen_db_prepare_input((int)$_POST['product_is_always_free_shipping']),
'products_qty_box_status' => zen_db_prepare_input($_POST['products_qty_box_status']),
'products_quantity_order_max' => zen_db_prepare_input($_POST['products_quantity_order_max']),
'products_sort_order' => (int)zen_db_prepare_input($_POST['products_sort_order']),
'products_discount_type' => zen_db_prepare_input($_POST['products_discount_type']),
'products_discount_type_from' => zen_db_prepare_input($_POST['products_discount_type_from']),
'products_price_sorter' => zen_db_prepare_input($_POST['products_price_sorter'])
);
// when set to none remove from database
// is out dated for browsers use radio only
$sql_data_array['products_image'] = zen_db_prepare_input($_POST['products_image']);
$new_image= 'true';
if ($_POST['image_delete'] == 1) {
$sql_data_array['products_image'] = '';
$new_image= 'false';
}
if ($_POST['image_delete'] == 1) {
$sql_data_array['products_image'] = '';
$new_image= 'false';
}
if ($action == 'insert_product') {
$insert_sql_data = array( 'products_date_added' => 'now()',
'master_categories_id' => (int)$current_category_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_PRODUCTS, $sql_data_array);
$products_id = zen_db_insert_id();
// reset products_price_sorter for searches etc.
zen_update_products_price_sorter($products_id);
$db->Execute("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . "
(products_id, categories_id)
values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *INSERTS* HERE //////
//AutoFacebook
$app_id = "Your App_ID Here"; //given when you created app
$app_secret = "Your App Secret Code Here"; //given when you created app
$page_id = "Page ID Here"; //obtained from running facebook_authorization.php from your browser
$page_token = "Page Token Here"; //long number obtained from facebook_authorization.php
$store_name = "Your Store"; // store name i.e. "Mary's Car Shop", or "MikesCupcakes.com."
$store_url = 'http://www.yourdomain.com'; //path to your store without the trailing "/"
$cur = '$'; //change to your currency symbol($, €, £, ¥, etc.). Assumes symbol comes in front of numbers
$new_message = "New Product Added"; // change to whatever or leave the same. i.e "New Cupcake!"
// No Need to edit below here.
$prod_image = $store_url . "/images/" . $_POST['products_image'];
//webelity.com fixed number formating issues 11-4-2013 - 2.4
//$price = $products_price;
$price = number_format($products_price, 2, '.', '');
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id;
$prod_name = $_POST['products_name'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$prod_description = $_POST['products_description'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$info_strip = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $prod_description);
$description_stripped = strip_tags($info_strip);
//webelity.com 1-15-2012 added check to insure length does not reach the 10,000 character limit on descriptions in facebook.
$charset = 'UTF-8';
$no_description = 0;
$length = 9996;
if(mb_strlen($description_stripped, $charset) > $length) {
$facebook_description = mb_substr($description_stripped, 0, $length, $charset) . '...';
}
elseif(mb_strlen($description_stripped, $charset) == $no_description)
{
$facebook_description = "No description provided for this product.";
}
else
{
$facebook_description = $description_stripped;
}
include_once 'facebook/facebook.php';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true, )
);
// webelity.com modfied currancy and price information and added facebook_description to lower array
$attachment = array(
'access_token' => $page_token,
'message' => $new_message . " - " . $prod_name,
'name' => $prod_name,
'link' => $prod_url,
'caption' => 'Price: ' . $cur . $price,
'description' => $facebook_description,
'picture' => $prod_image
);
try {
$status = $facebook->api($page_id.'/feed', 'post', $attachment);
$messageStack->add_session('Facebook was successfully updated!', 'success');
}
catch (FacebookApiException $fbe){
$fberror = $fbe->result['error']['message'];
$messageStack->add_session('Facebook Error: '.$fberror, 'error');
}
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* ////////
///////////////////////////////////////////////////////
} elseif ($action == 'update_product') {
$update_sql_data = array( 'products_last_modified' => 'now()',
'master_categories_id' => ($_POST['master_category'] > 0 ? zen_db_prepare_input($_POST['master_category']) : zen_db_prepare_input($_POST['master_categories_id'])));
$sql_data_array = array_merge($sql_data_array, $update_sql_data);
zen_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
// reset products_price_sorter for searches etc.
zen_update_products_price_sorter((int)$products_id);
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
//AutoFacebook Video instructions can be found on YouTube at: youtu.be/IfW42McTKyE
$app_id = "Your App_ID Here"; //given when you created app
$app_secret = "Your App Secret Code Here"; //given when you created app
$page_id = "Page ID Here"; //obtained from running facebook_authorization.php from your browser
$page_token = "Page Token Here"; //long number obtained from facebook_authorization.php
$store_name = "Your Store"; // store name i.e. "Mary's Car Shop", or "MikesCupcakes.com."
$store_url = 'http://www.yourdomain.com'; //path to your store without the trailing "/"
$cur = '$'; //change to your currency symbol($, €, £, ¥, etc.). Assumes symbol comes in front of numbers
$new_message = "Product Updated"; // change to whatever or leave the same. i.e "New Cupcake!"
$prod_image = $store_url . "/images/" . $_POST['products_image'];
//webelity.com fixed number formating issues 11-4-2013 - 2.4
//$price = $products_price;
$price = number_format($products_price, 2, '.', '');
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id;
$prod_name = $_POST['products_name'][$_SESSION['languages_id']];
$prod_description = $_POST['products_description'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$info_strip = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $prod_description);
$description_stripped = strip_tags($info_strip);
//webelity.com 1-15-2012 added check to insure length does not reach the 10,000 character limit on descriptions in facebook.
$charset = 'UTF-8';
$no_description = 0;
$length = 9996;
if(mb_strlen($description_stripped, $charset) > $length) {
$facebook_description = mb_substr($description_stripped, 0, $length, $charset) . '...';
}
elseif(mb_strlen($description_stripped, $charset) == $no_description)
{
$facebook_description = "No description provided for this product.";
}
else
{
$facebook_description = $description_stripped;
}
include_once 'facebook/facebook.php';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true, )
);
// webelity.com modfied currancy and price information and added facebook_description to lower array
$attachment = array(
'access_token' => $page_token,
'message' => $new_message . " - " . $prod_name,
'name' => $prod_name,
'link' => $prod_url,
'caption' => 'Price: ' . $cur . $price,
'description' => $facebook_description,
'picture' => $prod_image
);
try {
$status = $facebook->api($page_id.'/feed', 'post', $attachment);
$messageStack->add_session('Facebook was successfully updated!', 'success');
}
catch (FacebookApiException $fbe){
$fberror = $fbe->result['error']['message'];
$messageStack->add_session('Facebook Error: '.$fberror, 'error');
}
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* ////////
///////////////////////////////////////////////////////
}
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$sql_data_array = array('products_name' => zen_db_prepare_input($_POST['products_name'][$language_id]),
'products_description' => zen_db_prepare_input($_POST['products_description'][$language_id]),
'products_url' => zen_db_prepare_input($_POST['products_url'][$language_id]));
if ($action == 'insert_product') {
$insert_sql_data = array('products_id' => (int)$products_id,
'language_id' => (int)$language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_product') {
zen_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}
// add meta tags
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
if ($action == 'insert_product_meta_tags') {
$insert_sql_data = array('products_id' => (int)$products_id,
'language_id' => (int)$language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_product_meta_tags') {
zen_db_perform(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}
// future image handler code
define('IMAGE_MANAGER_HANDLER', 0);
define('DIR_IMAGEMAGICK', '');
if ($new_image == 'true' and IMAGE_MANAGER_HANDLER >= 1) {
$src= DIR_FS_CATALOG . DIR_WS_IMAGES . zen_get_products_image((int)$products_id);
$filename_small= $src;
preg_match("/.*\/(.*)\.(\w*)$/", $src, $fname);
list($oiwidth, $oiheight, $oitype) = getimagesize($src);
$small_width= SMALL_IMAGE_WIDTH;
$small_height= SMALL_IMAGE_HEIGHT;
$medium_width= MEDIUM_IMAGE_WIDTH;
$medium_height= MEDIUM_IMAGE_HEIGHT;
$large_width= LARGE_IMAGE_WIDTH;
$large_height= LARGE_IMAGE_HEIGHT;
$k = max($oiheight / $small_height, $oiwidth / $small_width); //use smallest size
$small_width = round($oiwidth / $k);
$small_height = round($oiheight / $k);
$k = max($oiheight / $medium_height, $oiwidth / $medium_width); //use smallest size
$medium_width = round($oiwidth / $k);
$medium_height = round($oiheight / $k);
$large_width= $oiwidth;
$large_height= $oiheight;
$products_image = zen_get_products_image((int)$products_id);
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = preg_replace('/'.$products_image_extension.'/', '', $products_image);
$filename_medium = DIR_FS_CATALOG . DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . '.' . $fname[2];
$filename_large = DIR_FS_CATALOG . DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE . '.' . $fname[2];
// ImageMagick
if (IMAGE_MANAGER_HANDLER == '1') {
copy($src, $filename_large);
copy($src, $filename_medium);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $large_width . " " . $filename_large);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $medium_width . " " . $filename_medium);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $small_width . " " . $filename_small);
}
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_POST['search']) ? '&search=' . $_POST['search'] : '') ));
} else {
$messageStack->add_session(ERROR_NO_DATA_TO_SAVE, 'error');
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_POST['search']) ? '&search=' . $_POST['search'] : '') ));
}
-
Re: AutoFacebook [Support]
[22-Jan-2014 18:23:32] PHP Warning: Cannot modify header information - headers already sent by (output started at /home1/public_html/newadmin/includes/modules/update_product.php:1) in /home1/public_html/newadmin/includes/functions/general.php on line 21
I'm having the exact same problem as above. I'm installing this on a fresh install of ZC 1.5.1, so I just uploaded the update_product.php file with no changes. That didn't work, so I merged the two as specified above and that didn't work either. The product gets posted to FB, but on ZC, it loads up a blank page instead of going back to the categories page. Help anyone? :)
-
1 Attachment(s)
Re: AutoFacebook [Support]
Hello guys, I have a small problem with the plugin.
I'm on zencart 1.3.9h and I installed the plugin using the video tutorial, but I have a problem with the automatic posting on my facebook page.
The posting doesn't come with my facebook page name but with my real name!
This is an example:
Attachment 13732
How can I fix it? Thanks!
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
zch0071
Hi,
I need help.
I have used autofacebook plug-in to upload the products information to facebook, but the pictures on facebook are completely inconformity from the website. The facebook has resized the pictures a lot and the pictures looks very twisted.
facebook info:
Attachment 13350
Product info:
Attachment 13351
how to fix?
I Am Having The Same Issue How Can I Solve This!!!!! The Pic Of My Product In The Post On Facebook Is WAY TO BIG!!!
-
Re: AutoFacebook [Support]
I was wondering if the answer about posting to the page instead of the personal wall has been answered? I tried going back through the thread but was a little confused. I am having the same issue and would love to get it straigtened out. Thanks!
-
Re: AutoFacebook [Support]
Having same problem getting blank page and same errors as everybody else.
Whenever I add a new Product or Update a product it takes me to BLANK PAGE.
[01-Mar-2014 01:43:38] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/54/6674154/html/crochets/adminurrhtcqq/includes/modules/update_product.php:1) in /home/content/54/6674154/html/crochets/adminurrhtcqq/includes/functions/general.php on line 21
-
Re: AutoFacebook [Support]
In Case anybody having same error try replacing entire update_product.php with this code:
This is currently working for me.
But remember you put your FaceBook Info
PHP Code:
<?php
/**
* @package admin
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: update_product.php 18695 2011-05-04 05:24:19Z drbyte $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (isset($_GET['pID'])) $products_id = zen_db_prepare_input($_GET['pID']);
if (isset($_POST['edit_x']) || isset($_POST['edit_y'])) {
$action = 'new_product';
} elseif ($_POST['products_model'] . $_POST['products_url'] . $_POST['products_name'] . $_POST['products_description'] != '') {
$products_date_available = zen_db_prepare_input($_POST['products_date_available']);
$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';
// Data-cleaning to prevent MySQL5 data-type mismatch errors:
$tmp_value = zen_db_prepare_input($_POST['products_quantity']);
$products_quantity = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['products_price']);
$products_price = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['products_weight']);
$products_weight = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$tmp_value = zen_db_prepare_input($_POST['manufacturers_id']);
$manufacturers_id = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
$sql_data_array = array('products_quantity' => $products_quantity,
'products_type' => zen_db_prepare_input($_GET['product_type']),
'products_model' => zen_db_prepare_input($_POST['products_model']),
'products_price' => $products_price,
'products_date_available' => $products_date_available,
'products_weight' => $products_weight,
'products_status' => zen_db_prepare_input((int)$_POST['products_status']),
'products_virtual' => zen_db_prepare_input((int)$_POST['products_virtual']),
'products_tax_class_id' => zen_db_prepare_input((int)$_POST['products_tax_class_id']),
'manufacturers_id' => $manufacturers_id,
'products_quantity_order_min' => zen_db_prepare_input($_POST['products_quantity_order_min']),
'products_quantity_order_units' => zen_db_prepare_input($_POST['products_quantity_order_units']),
'products_priced_by_attribute' => zen_db_prepare_input($_POST['products_priced_by_attribute']),
'product_is_free' => zen_db_prepare_input((int)$_POST['product_is_free']),
'product_is_call' => zen_db_prepare_input((int)$_POST['product_is_call']),
'products_quantity_mixed' => zen_db_prepare_input($_POST['products_quantity_mixed']),
'product_is_always_free_shipping' => zen_db_prepare_input((int)$_POST['product_is_always_free_shipping']),
'products_qty_box_status' => zen_db_prepare_input($_POST['products_qty_box_status']),
'products_quantity_order_max' => zen_db_prepare_input($_POST['products_quantity_order_max']),
'products_sort_order' => (int)zen_db_prepare_input($_POST['products_sort_order']),
'products_discount_type' => zen_db_prepare_input($_POST['products_discount_type']),
'products_discount_type_from' => zen_db_prepare_input($_POST['products_discount_type_from']),
'products_price_sorter' => zen_db_prepare_input($_POST['products_price_sorter'])
);
// when set to none remove from database
// is out dated for browsers use radio only
$sql_data_array['products_image'] = zen_db_prepare_input($_POST['products_image']);
$new_image= 'true';
if ($_POST['image_delete'] == 1) {
$sql_data_array['products_image'] = '';
$new_image= 'false';
}
if ($_POST['image_delete'] == 1) {
$sql_data_array['products_image'] = '';
$new_image= 'false';
}
if ($action == 'insert_product') {
$insert_sql_data = array( 'products_date_added' => 'now()',
'master_categories_id' => (int)$current_category_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_PRODUCTS, $sql_data_array);
$products_id = zen_db_insert_id();
// reset products_price_sorter for searches etc.
zen_update_products_price_sorter($products_id);
$db->Execute("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . "
(products_id, categories_id)
values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *INSERTS* HERE //////
//AutoFacebook
$app_id = "Your App_ID Here"; //given when you created app
$app_secret = "Your App Secret Code Here"; //given when you created app
$page_id = "Page ID Here"; //obtained from running facebook_authorization.php from your browser
$page_token = "Page Token Here"; //long number obtained from facebook_authorization.php
$store_name = "Your Store"; // store name i.e. "Mary's Car Shop", or "MikesCupcakes.com."
$store_url = 'http://www.yourdomain.com'; //path to your store without the trailing "/"
$cur = '$'; //change to your currency symbol($, €, £, ¥, etc.). Assumes symbol comes in front of numbers
$new_message = "New Product Added"; // change to whatever or leave the same. i.e "New Cupcake!"
// No Need to edit below here.
$prod_image = $store_url . "/images/" . $_POST['products_image'];
//webelity.com fixed number formating issues 11-4-2013 - 2.4
//$price = $products_price;
$price = number_format($products_price, 2, '.', '');
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id;
$prod_name = $_POST['products_name'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$prod_description = $_POST['products_description'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$info_strip = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $prod_description);
$description_stripped = strip_tags($info_strip);
//webelity.com 1-15-2012 added check to insure length does not reach the 10,000 character limit on descriptions in facebook.
$charset = 'UTF-8';
$no_description = 0;
$length = 9996;
if(mb_strlen($description_stripped, $charset) > $length) {
$facebook_description = mb_substr($description_stripped, 0, $length, $charset) . '...';
}
elseif(mb_strlen($description_stripped, $charset) == $no_description)
{
$facebook_description = "No description provided for this product.";
}
else
{
$facebook_description = $description_stripped;
}
include_once 'facebook/facebook.php';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true, )
);
// webelity.com modfied currancy and price information and added facebook_description to lower array
$attachment = array(
'access_token' => $page_token,
'message' => $new_message . " - " . $prod_name,
'name' => $prod_name,
'link' => $prod_url,
'caption' => 'Price: ' . $cur . $price,
'description' => $facebook_description,
'picture' => $prod_image
);
try {
$status = $facebook->api($page_id.'/feed', 'post', $attachment);
$messageStack->add_session('Facebook was successfully updated!', 'success');
}
catch (FacebookApiException $fbe){
$fberror = $fbe->result['error']['message'];
$messageStack->add_session('Facebook Error: '.$fberror, 'error');
}
//// *END OF PRODUCT-TYPE-SPECIFIC INSERTS* ////////
///////////////////////////////////////////////////////
} elseif ($action == 'update_product') {
$update_sql_data = array( 'products_last_modified' => 'now()',
'master_categories_id' => ($_POST['master_category'] > 0 ? zen_db_prepare_input($_POST['master_category']) : zen_db_prepare_input($_POST['master_categories_id'])));
$sql_data_array = array_merge($sql_data_array, $update_sql_data);
zen_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
// reset products_price_sorter for searches etc.
zen_update_products_price_sorter((int)$products_id);
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
//AutoFacebook
$app_id = "Your App_ID Here"; //given when you created app
$app_secret = "Your App Secret Code Here"; //given when you created app
$page_id = "Page ID Here"; //obtained from running facebook_authorization.php from your browser
$page_token = "Page Token Here"; //long number obtained from facebook_authorization.php
$store_name = "Your Store"; // store name i.e. "Mary's Car Shop", or "MikesCupcakes.com."
$store_url = 'http://www.yourdomain.com'; //path to your store without the trailing "/"
$cur = '$'; //change to your currency symbol($, €, £, ¥, etc.). Assumes symbol comes in front of numbers
$new_message = "New Product Added"; // change to whatever or leave the same. i.e "New Cupcake!"
// No Need to edit below here.
$prod_image = $store_url . "/images/" . $_POST['products_image'];
//webelity.com fixed number formating issues 11-4-2013 - 2.4
//$price = $products_price;
$price = number_format($products_price, 2, '.', '');
$prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id;
$prod_name = $_POST['products_name'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$prod_description = $_POST['products_description'][$_SESSION['languages_id']];
//webelity.com changed this line below to strip html tags from descriptions (Facebook does not support standard html input on descriptions via api calls)
$info_strip = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $prod_description);
$description_stripped = strip_tags($info_strip);
//webelity.com 1-15-2012 added check to insure length does not reach the 10,000 character limit on descriptions in facebook.
$charset = 'UTF-8';
$no_description = 0;
$length = 9996;
if(mb_strlen($description_stripped, $charset) > $length) {
$facebook_description = mb_substr($description_stripped, 0, $length, $charset) . '...';
}
elseif(mb_strlen($description_stripped, $charset) == $no_description)
{
$facebook_description = "No description provided for this product.";
}
else
{
$facebook_description = $description_stripped;
}
include_once 'facebook/facebook.php';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true, )
);
// webelity.com modfied currancy and price information and added facebook_description to lower array
$attachment = array(
'access_token' => $page_token,
'message' => $new_message . " - " . $prod_name,
'name' => $prod_name,
'link' => $prod_url,
'caption' => 'Price: ' . $cur . $price,
'description' => $facebook_description,
'picture' => $prod_image
);
try {
$status = $facebook->api($page_id.'/feed', 'post', $attachment);
$messageStack->add_session('Facebook was successfully updated!', 'success');
}
catch (FacebookApiException $fbe){
$fberror = $fbe->result['error']['message'];
$messageStack->add_session('Facebook Error: '.$fberror, 'error');
}
//// *END OF PRODUCT-TYPE-SPECIFIC UPDATES* ////////
///////////////////////////////////////////////////////
}
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$sql_data_array = array('products_name' => zen_db_prepare_input($_POST['products_name'][$language_id]),
'products_description' => zen_db_prepare_input($_POST['products_description'][$language_id]),
'products_url' => zen_db_prepare_input($_POST['products_url'][$language_id]));
if ($action == 'insert_product') {
$insert_sql_data = array('products_id' => (int)$products_id,
'language_id' => (int)$language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_product') {
zen_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}
// add meta tags
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
if ($action == 'insert_product_meta_tags') {
$insert_sql_data = array('products_id' => (int)$products_id,
'language_id' => (int)$language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_product_meta_tags') {
zen_db_perform(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}
// future image handler code
define('IMAGE_MANAGER_HANDLER', 0);
define('DIR_IMAGEMAGICK', '');
if ($new_image == 'true' and IMAGE_MANAGER_HANDLER >= 1) {
$src= DIR_FS_CATALOG . DIR_WS_IMAGES . zen_get_products_image((int)$products_id);
$filename_small= $src;
preg_match("/.*\/(.*)\.(\w*)$/", $src, $fname);
list($oiwidth, $oiheight, $oitype) = getimagesize($src);
$small_width= SMALL_IMAGE_WIDTH;
$small_height= SMALL_IMAGE_HEIGHT;
$medium_width= MEDIUM_IMAGE_WIDTH;
$medium_height= MEDIUM_IMAGE_HEIGHT;
$large_width= LARGE_IMAGE_WIDTH;
$large_height= LARGE_IMAGE_HEIGHT;
$k = max($oiheight / $small_height, $oiwidth / $small_width); //use smallest size
$small_width = round($oiwidth / $k);
$small_height = round($oiheight / $k);
$k = max($oiheight / $medium_height, $oiwidth / $medium_width); //use smallest size
$medium_width = round($oiwidth / $k);
$medium_height = round($oiheight / $k);
$large_width= $oiwidth;
$large_height= $oiheight;
$products_image = zen_get_products_image((int)$products_id);
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = preg_replace('/'.$products_image_extension.'/', '', $products_image);
$filename_medium = DIR_FS_CATALOG . DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . '.' . $fname[2];
$filename_large = DIR_FS_CATALOG . DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE . '.' . $fname[2];
// ImageMagick
if (IMAGE_MANAGER_HANDLER == '1') {
copy($src, $filename_large);
copy($src, $filename_medium);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $large_width . " " . $filename_large);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $medium_width . " " . $filename_medium);
exec(DIR_IMAGEMAGICK . "mogrify -geometry " . $small_width . " " . $filename_small);
}
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_POST['search']) ? '&search=' . $_POST['search'] : '') ));
} else {
$messageStack->add_session(ERROR_NO_DATA_TO_SAVE, 'error');
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_POST['search']) ? '&search=' . $_POST['search'] : '') ));
}
-
Re: AutoFacebook [Support]
Will there be updated instructions for setting up the App on Facebook? Apparently they've made some major changes with several steps that aren't in the current video.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
andilyn
Will there be updated instructions for setting up the App on Facebook? Apparently they've made some major changes with several steps that aren't in the current video.
I would like to know this too. The Facebook screens and options shown in the video do not seem to exist anymore.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
Danielle
I would like to know this too. The Facebook screens and options shown in the video do not seem to exist anymore.
I would like updated instructions too (please). It's two months since the first request. Is this support forum no longer supported?
-
Re: AutoFacebook [Support]
I know there is no support for this mod but I'm hoping someone can point me in the right direction:
Basically, the product image is too large on my facebook page. Any fix?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
Rizla
I know there is no support for this mod but I'm hoping someone can point me in the right direction:
Basically, the product image is too large on my facebook page. Any fix?
I use the module and there was no major changes in fb. If you follow the readme instructions it will lead you to success.
I' ll try to prepare some screenshots of my online autofacebook module to help as much as possible.
-
2 Attachment(s)
Re: AutoFacebook [Support]
Hi
These are two screen shots of the before and now... AFAIK I have not change anything, but ya never know ;)
Can clearly see the software is only showing the middle part of the image (enlarged)
-
1 Attachment(s)
Re: AutoFacebook [Support]
My mistake. I didn't notice that the Rizla was complaining about the fb posts. Yes that is a facebook change and does not has anything to do with this great module. So nothing to be fixed here :)
The way my autofacebook posts look like are as shown on the photo. Some pictures fit and some don't so i guess that has to do with the resolution of the product picture. Attachment 14256
-
Re: AutoFacebook [Support]
Thanks for that infogate
Glad to know it's Facebook changes
-
Re: AutoFacebook [Support]
I tried to open facebook_authorization.php and got following error.
I have only edit my information in this file so not sure why getting this error.
Status: array (
0 => '',
)
Fatal error: Uncaught CurlException: 60: SSL certificate problem: unable to get local issuer certificate thrown in /home/suppgeek/public_html/facebook_authorization.php on line 600
-
Re: AutoFacebook [Support]
That's a server issue. Not sure what's happening but I would contact your hosting company about that. Googling that error message brings up more information with some recommendations. If you are testing this locally, that might well be the problem and you won't have the problem on a live site.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jsarwar
I tried to open facebook_authorization.php and got following error.
I have only edit my information in this file so not sure why getting this error.
Status: array (
0 => '',
)
Fatal error: Uncaught CurlException: 60: SSL certificate problem: unable to get local issuer certificate thrown in /home/suppgeek/public_html/facebook_authorization.php on line 600
There are several reasons. However, the most common reason is server being unable to verify the Certification Authority (CA), who created the certificate.
To solve the issue, please, check with your hosting provider to verify if the local SSL libraries (list of valid Certification Authorities) are up to date.
Have a look here for a possible solution
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
infogate
There are several reasons. However, the most common reason is server being unable to verify the Certification Authority (CA), who created the certificate.
To solve the issue, please, check with your hosting provider to verify if the local SSL libraries (list of valid Certification Authorities) are up to date.
Have a look here for a
possible solution
Thank you. I have sent hosting message and waiting for update. I have tried curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); and it shows following error message:
"Status: array (
0 => '',
)
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /home/suppgeek/public_html/facebook_authorization.php on line 533"
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jsarwar
Thank you. I have sent hosting message and waiting for update. I have tried curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); and it shows following error message:
"Status: array (
0 => '',
)
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /home/suppgeek/public_html/facebook_authorization.php on line 533"
Hosting Company telling me that there is nothing wrong with server. I see you did not select any category when created facebook app but now it is required and I selected "Communication" Is that make difference?
-
Re: AutoFacebook [Support]
Figured this out. I have added information to update_product.php and then created a test product. Upon completion it shows
Facebook Error: (#200) The user hasn't authorized the application to perform this action
My app is public. Any idea why I am getting this error?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
delia
That's a server issue. Not sure what's happening but I would contact your hosting company about that. Googling that error message brings up more information with some recommendations. If you are testing this locally, that might well be the problem and you won't have the problem on a live site.
Resolved but now when I create product it shows message "Facebook Error: (#200) The user hasn't authorized the application to perform this action"
I see in video when app is created, no category is selected but now it is required and for some we have to submit for approval.
Any idea how to get rid of this error message?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jsarwar
Resolved but now when I create product it shows message "Facebook Error: (#200) The user hasn't authorized the application to perform this action"
I see in video when app is created, no category is selected but now it is required and for some we have to submit for approval.
Any idea how to get rid of this error message?
I guess you just need to reset the token to your page to make it work again. As menstioned on the well prepared readme file of the application by Jamie Taylor follow this steps to get a new token.
1. Open up the included facebook_authorization.php file and edit lines 4 and 5 with your App information.
Note: facebook_authorization.php is a simple file that we're going to upload to our server and run from our browser to authorize our application to do things for us like post to our page's wall. After if gives us certain information it is no longer needed and should be deleted.
So on line 6 where you see: $app_location = "http://yoursite/facebook/facebook_authorization.php"; This is simply the URL to where you plan to upload facebook_authorization.php. I suggest making a temporary folder on your folder called "facebook". However, where ever you plan to upload it, it must be on the same server you specified in Step 1 and make sure you reflect it's location on line 6. Once you're done editing lines 4-6 save and upload it to where ever you specified in your $app_location.
2. Once uploaded run the file in your browser and you will be taken to facebook's Permission Request prompt to authorize your app. Click "Allow."
3. You should now see a Success page with your page's ID and Page's Token. We need those for our next step.
Note: if you see a period (or any other punctuation) at the end of your page's Token consider it part of the token.
4. Open up the included update_product.php file in the admin/includes/modules folder and edit lines 90 through 97 with your Application Info and the Info given from the last step (Step 9). Note: $store_url needs to be the full url to your store without the trailing ('/'). So it should look like "http://www.mystore.com" or "http://www.mystore.com/store". Alos: lines 96 and 97 can be personallized or just left as they are.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
infogate
I guess you just need to reset the token to your page to make it work again. As menstioned on the well prepared readme file of the application by Jamie Taylor follow this steps to get a new token.
1. Open up the included facebook_authorization.php file and edit lines 4 and 5 with your App information.
Note: facebook_authorization.php is a simple file that we're going to upload to our server and run from our browser to authorize our application to do things for us like post to our page's wall. After if gives us certain information it is no longer needed and should be deleted.
So on line 6 where you see: $app_location = "http://yoursite/facebook/facebook_authorization.php"; This is simply the URL to where you plan to upload facebook_authorization.php. I suggest making a temporary folder on your folder called "facebook". However, where ever you plan to upload it, it must be on the same server you specified in Step 1 and make sure you reflect it's location on line 6. Once you're done editing lines 4-6 save and upload it to where ever you specified in your $app_location.
2. Once uploaded run the file in your browser and you will be taken to facebook's Permission Request prompt to authorize your app. Click "Allow."
3. You should now see a Success page with your page's ID and Page's Token. We need those for our next step.
Note: if you see a period (or any other punctuation) at the end of your page's Token consider it part of the token.
4. Open up the included update_product.php file in the admin/includes/modules folder and edit lines 90 through 97 with your Application Info and the Info given from the last step (Step 9). Note: $store_url needs to be the full url to your store without the trailing ('/'). So it should look like "http://www.mystore.com" or "http://www.mystore.com/store". Alos: lines 96 and 97 can be personallized or just left as they are.
Thank you for info but I have already done all this. I have removed app few times from profile and authorize it again and input new token in update_product file but it is not working. I was reading yesterday and it shows "manage_pages" require facebook approval now and have to submit app for approval. Is that sounds right?
-
Re: AutoFacebook [Support]
Sorry to say but it is just a token problem. Try to verify the token you get for your page is right here cause it seems you are missing something on the procedure.
But the errors that you get means you don't provide a confirmed token to the application.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
infogate
Sorry to say but it is just a token problem. Try to verify the token you get for your page is right
here cause it seems you are missing something on the procedure.
But the errors that you get means you don't provide a confirmed token to the application.
Thanks.
I tried and this page gave error: Failed to parse URL
I am copying token directly from page loads by domain.com/facebook_authorization.php
for example
[name] => xxxxxxxxxxxxx
[access_token] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[perms] => Array
(
[0] => ADMINISTER
[1] => EDIT_PROFILE
[2] => CREATE_CONTENT
[3] => MODERATE_CONTENT
[4] => CREATE_ADS
[5] => BASIC_ADMIN
)
[id] => xxxxxxxxxxxxx
I have replaced actual values with xxxxxxxxxxxxx here.
I have also entered same token and id to update_product page with other information. Not sure what I am still missing which causing this error.
-
Re: AutoFacebook [Support]
Suggested solutions
1. Double check that you provide the correct token to application
2. Double check the following information are corect before run the facebook_authorization.php
//edit with your info
$app_id = "xxxxxxxxxxxxx"; //given when you created app
$app_secret = "YYYYYYYYYYY"; //given when you created app
$site_url = "http://www.yourdomain.com/facebook_authorization.php"; //full path to location of this file.
3. Double check that you provide correct information to the update_product.php
//AutoFacebook
$app_id = "xxxxxxxxxxxx"; //given when you created app
$app_secret = "YYYYYYYYYYYY"; //given when you created app
$page_id = "KKKKKKKKKKKKK"; //obtained from running facebook_authorization.php from your browser
$page_token = "VERY LONG STRING YOU GET FROM facebook_authorization.php"; //long number obtained from facebook_authorization.php
4. Double check Application ---> Settings ---> Migrations ---> ON
If you follow all the above and try not to mix the information from page_id and page_token with other pages you might created in facebook everything will work perfect.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
infogate
Suggested solutions
1. Double check that you provide the correct token to application
2. Double check the following information are corect before run the facebook_authorization.php
//edit with your info
$app_id = "xxxxxxxxxxxxx"; //given when you created app
$app_secret = "YYYYYYYYYYY"; //given when you created app
$site_url = "http://www.yourdomain.com/facebook_authorization.php"; //full path to location of this file.
3. Double check that you provide correct information to the update_product.php
//AutoFacebook
$app_id = "xxxxxxxxxxxx"; //given when you created app
$app_secret = "YYYYYYYYYYYY"; //given when you created app
$page_id = "KKKKKKKKKKKKK"; //obtained from running facebook_authorization.php from your browser
$page_token = "VERY LONG STRING YOU GET FROM facebook_authorization.php"; //long number obtained from facebook_authorization.php
4. Double check Application ---> Settings ---> Migrations ---> ON
If you follow all the above and try not to mix the information from page_id and page_token with other pages you might created in facebook everything will work perfect.
Checked again and everything looks correct but issue still exist.
The only two reasons I can think of are:
In demo video when author created FB app it did not ask him to select category which is required now.
When I open facebook_authorization file first time to authorize app it shows on top "manage_pages" feature not available as it require approval. But later on it shows app will control "Manage pages"
So I think issue is probably here.
-
Re: AutoFacebook [Support]
OK. I am totally sure that you are missing a step there to authorize your application.
* manage_pages (or manage_groups) - This is what verifies you are a manager of a page/group and are allowed to post to it
* publish_actions - This is what allows the app (your site) to post on your behalf
The last thing to propose is to
1. Remove the application you created
2. Create a new one and
3. Follow all the steps from the begining as it apears to this video tutorial
-
1 Attachment(s)
Re: AutoFacebook [Support]
This is the error I am getting even tho I authorized the app to access facebook
Attachment 14491
any help is appreciated. Thanks
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
MadPricerSales
This is the error I am getting even tho I authorized the app to access facebook
Attachment 14491
any help is appreciated. Thanks
This is exact same error I have been getting but have not find solution even I have tried making new app and using new data but still getting same error. Please let me know if you find a solution.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jsarwar
This is exact same error I have been getting but have not find solution even I have tried making new app and using new data but still getting same error. Please let me know if you find a solution.
I have tried every thing and no success, I am fixing to send email to facebook to see if it might be on there end.
I have even tried older versions of AUTOFACEBOOK.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
MadPricerSales
This is the error I am getting even tho I authorized the app to access facebook
Attachment 14491
any help is appreciated. Thanks
Please ensure that this is enabled to facebook application
Status & Review ----> Do you want to make this app and all its live features available to the general public? ---> yes
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
infogate
Please ensure that this is enabled to facebook application
Status & Review ----> Do you want to make this app and all its live features available to the general public? ---> yes
Yes I have that set to yes
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
MadPricerSales
Yes I have that set to yes
1. Double check that you provide the correct token to application
2. Double check the following information are corect before run the facebook_authorization.php
//edit with your info
$app_id = "xxxxxxxxxxxxx"; //given when you created app
$app_secret = "YYYYYYYYYYY"; //given when you created app
$site_url = "http://www.yourdomain.com/facebook_authorization.php"; //full path to location of this file.
3. Double check that you provide correct information to the update_product.php
//AutoFacebook
$app_id = "xxxxxxxxxxxx"; //given when you created app
$app_secret = "YYYYYYYYYYYY"; //given when you created app
$page_id = "KKKKKKKKKKKKK"; //obtained from running facebook_authorization.php from your browser
$page_token = "VERY LONG STRING YOU GET FROM facebook_authorization.php"; //long number obtained from facebook_authorization.php
4. Double check Application ---> Settings ---> Migrations ---> ON
If you follow all the above and try not to mix the information from page_id and page_token with other pages you might created in facebook everything will work perfect.
If you keep getting the same error i suggest to delete facebook aplication and create it again
-
1 Attachment(s)
Re: AutoFacebook [Support]
I beleive that under the newer facebook development apps you have to submit it for approval before the app will allow posting to your facebook page.
here is a pic of the app asking for permissions, but not permissions to post.
Attachment 14493
-
Re: AutoFacebook [Support]
Cant belive this, today I loose all images on facebook as they dont accept now spaces in image name. Is there workaround in AutoFacebook that can pass this problem? THANX
-
Re: AutoFacebook [Support]
I just noticed my images were not working for the past few weeks, I always put spaces in image name. Any workaround would be much appreciated.
-
Re: AutoFacebook [Support]
I am lucky to have had some invaluable with this from somebody. On the update_product file under your admin/includes/modules you need to change the line that mentions the image part. So it should like this :-
Quote:
$prod_image = $store_url . "/images/" . rawurlencode($_POST['products_image']);
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
MadPricerSales
This is the error I am getting even tho I authorized the app to access facebook
Attachment 14491
any help is appreciated. Thanks
Facebook now requires you to submit the app for review to get permissions to post to your Facebook page. I have submitted mine 3 times and they have turned it down all 3 times even tho i explain to them that this app will only be used by me the creator of the app.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jsarwar
This is exact same error I have been getting but have not find solution even I have tried making new app and using new data but still getting same error. Please let me know if you find a solution.
Facebook now requires you to submit the app for review to get permissions to post to your Facebook page. I have submitted mine 3 times and they have turned it down all 3 times even tho i explain to them that this app will only be used by me the creator of the app. They said that they have to be able to run the app and see what it does, I don't know how to do that cause it works on the zencart module so how can I submit it for them to try unless I give away my admin username and password to the facebook review team.
-
Re: AutoFacebook [Support]
Is there no more support for this addon?
Has anyone requested app permissions to post and if so was it approved and how did you get them to approve app posting permissions.
I have submitted my app 3 times all 3 denials
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
MadPricerSales
Is there no more support for this addon?
Has anyone requested app permissions to post and if so was it approved and how did you get them to approve app posting permissions.
I have submitted my app 3 times all 3 denials
Don't need to get permission.
-
Re: AutoFacebook [Support]
I am getting following error on ZC 1.5.3
Facebook Error: (#100) picture is not properly formatted
Any idea?
Thanks
-
Re: AutoFacebook [Support]
could you please help me cause it says that this app can not post to facebook.
it says on developers.facebook.com that you have to request permissions to post to facebook.
please help. Thanks
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
MadPricerSales
could you please help me cause it says that this app can not post to facebook.
it says on developers.facebook.com that you have to request permissions to post to facebook.
please help. Thanks
Select Public to Yes and migration to ON in app settings to avoid this error. But you may still get error
"Use have not authorized to perform this action" in zencart admin.
I am still looking into this how to over come this error. It looks like facebook have changed and now app require approval for manage pages. My app is working ok for login on zencart via facebook but not for manage pages. To submit app for review, facebook team will do a test to see how app will work so may have to provide them login info etc. I will update you once I get more details. In case if you get any, please post here. Thank you!
-
Re: AutoFacebook [Support]
Hi There, The facebook ui is so different I'm not sure ive setup correctly...error
"Invalid redirect_uri: Given URL is not allowed by the Application configuration."
any help appreciated!
cuzz
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
cuzzmunger
Hi There, The facebook ui is so different I'm not sure ive setup correctly...error
"Invalid redirect_uri: Given URL is not allowed by the Application configuration."
any help appreciated!
cuzz
even after you have it setup you have to submit the app to Facebook for the permissions of posting to a Facebook page. I have submitted mine 3 times and all 3 times they have denied the permissions.
-
Re: AutoFacebook [Support]
yeh cool, I've done everything fb has asked but maybe it takes some time! I really wanted this up….
-
Re: AutoFacebook [Support]
help please, i am a newbie
i cant get autofacebook to work ihave check and double checked ids and token access codes
i keep getting this error
Error Facebook Error: (#200) The user hasn't authorized the application to perform this action
can some one tell me what i am doing wrong, facebook setup is so confusing
thanks
-
Re: AutoFacebook [Support]
The reason is that publish_stream is now deprecated; use publish_actions instead.
facebook_authorization.php
943: $perms = "publish_actions,manage_pages,offline_access";
-
Re: AutoFacebook [Support]
This is the error that i now receive:
Facebook Error: Invalid parameter
any help appreciated thanks
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
that's definited by in the $page_id
if you'd like to specify go to your page in your browser and you should see the page's id number in the address bar. then in (update_product.php) just page $page_id ="your page id" that specific number.
Is it possible to post to my page and my profile wall at the same time?
-
Re: AutoFacebook [Support]
Folks. the latest version of this mod does not work with 1.54 or facebook developers. It needs to be updated.
-
Re: AutoFacebook [Support]
I have been using this mod for couple of years... Recently I noticed facebook requires atleast 200 x 200 pixels of image. But, only small image of 100X80 is produced for "og:image". Therefore, Facebook replaces the product image with Facebook logo. Any help to replace small image with medium image? I am using Image Handler and I have configured Medium images to display 250X200 pixels.
-
Re: AutoFacebook [Support]
As there was no help coming from this Forum, I embarked upon fixing myself and I did successfully. This is what I did.
/includes/functions/functions_lookups.php
I added following codes in the above file:
PHP Code:
/*
* look up a products MEDIUM image and send back the image's HTML \<IMG...\> tag - ADDED BY GOPINATH GOSWAMI on June 25, 2015
*/
function zen_get_products_medium_image($product_id, $width = MEDIUM_IMAGE_WIDTH, $height = MEDIUM_IMAGE_HEIGHT) {
global $db;
$sql = "select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$product_id . "'";
$look_up = $db->Execute($sql);
return zen_image(DIR_WS_IMAGES . $look_up->fields['products_image'], zen_get_products_name($product_id), $width, $height);
}
Then, I edited the code in /includes/templates/YOUR-TEMPLATE/common/html_header.php as follows:
//get defined image or default
$myImage= zen_get_products_image((int)$_GET['products_id']);
was changed to
//get defined image or default
$myImage= zen_get_products_medium_image((int)$_GET['products_id']);
That's it... It worked like charm...!
I used facebook debug tool at https://developers.facebook.com/tools/debug/ and works perfectly.
-
Re: AutoFacebook [Support]
-
1 Attachment(s)
Re: AutoFacebook [Support]
Hi. I'm using zen-cart 1.5.1 and installed latest version of autofacebook. After installation got error message:
PHP Code:
Invalid Scopes: publish_stream, offline_access. This message is only shown to developers. Users of your app will ignore these permissions if present.
Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
Attachment 15686
Please advice.
Thank you
-
Re: AutoFacebook [Support]
Yeah, it doesn't work anymore if you are starting with a new app. We were using this for years, then I had to redo it and create a new app and got that error. As far as I know you can't use this anymore. If someone has successfully gotten this to work lately with a new app please share your steps in detail.
-
Re: AutoFacebook [Support]
Hi,
Can this autofacebook works on version V1.5.5e?
Thank you.
-
Re: AutoFacebook [Support]
I am getting this error..... {
"error": {
"message": "Can't load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings.",
"type": "OAuthException",
"code": 191,
"fbtrace_id": "GY/f5ZlrOi2"
}
}
Can u please tell me how to rectify this?
I have tried several times and have put the correct domain name on Facebook developers page.
-
Re: AutoFacebook [Support]
I use a batch table to upload products. Can I use this plugin?
Still have to manually upload the product to use this feature