New Zenner
- Join Date:
- Dec 2010
- Posts:
- 28
- Plugin Contributions:
- 0
AutoFacebook [Support]
nobody can help me?
Views: 140,955
New Zenner
nobody can help me?
Totally Zenned
Ducati87:
nobody can help me?
Not much I can do for you on this one, I do not and never used the light version. My apologies.
New Zenner
I tried to install autofacebook 2.0 but doesn't function. I don't know where is the problem...
New Zenner
I finally got this contribution to work! YEAH! However, it was posting to the wrong FB page, but thanks to the replies here, that's fixed.
But now, since I have set it to the correct FB page, it is giving me an error when I input a new product:
Error Facebook Error: (#200) Posts where the actor is a page cannot also include a target_id
Has anyone else experienced this one?
New Zenner
Can anyone tell me how to setup autofacebook 2.0? Because there are some things that I don't understand.
Thanks so much.
New Zenner
WHOSYOURDADDY:
IMPORTANT UPDATE FOR THOSE WHO MANAGE SEVERAL FACEBOOK PAGES
Like most I have been scratching my head on how to get this app from Jamielife (Thanks Jamielife:cool:) to post new products in our zen cart to the proper Fan Page/Business Page.
Each fan page has its own page id and access token. The easy part was getting the page ID the hard part was figuring out how to get the the access token for the specific page.
After you have gone through the initial steps outlined by Jamielife to get the app authorized the next steps will allow you to have this app post to the page of your choosing.
Here is the solution.:
- Run this link in your Browser. Please replace
URLwith your connect URL (Facebook Application dialog) andAPPIDwith your application IDYou will need to add https// to the following links
If done correctly you get your zen cart with the URL Parameter Access Token
This URL will return to you a URL parameter access_token.
Save the token somewhere;
Load This URL. Replace
TOKENwith the token received from Facebook at point 2.As a result you will get the json with all your pages and all access tokens. Save them somewhere;
Once you have this data it is simple going into the update_product.php at lines 88-92 and change them according to the information associated with the specific page that you want to mod to post to.
Test to make sure it works
I have tested it on 1.3.9f with the latest version of Jamielife's mod with success :clap:
Good Luck
THANK YOU, THANK YOU, THANK YOU!!! This worked, finally. Whew!:clap:
New Zenner
artistcsi:
I finally got this contribution to work! YEAH! However, it was posting to the wrong FB page, but thanks to the replies here, that's fixed.
But now, since I have set it to the correct FB page, it is giving me an error when I input a new product:
Error Facebook Error: (#200) Posts where the actor is a page cannot also include a target_idHas anyone else experienced this one?
http://www.zen-cart.com/forum/showthread.php?p=1006094&posted=1#post1006094
I searched first, but didn't see this answer until after I posted, sorry :blush: However, its all good now.
Totally Zenned
Ducati87:
nobody can help me?
Did you follow this guide? It has step by step instructions and still confirmed working. Also be sure your host allows JSON to connect but JSON is pretty much obsolete for facebook appilications so it should not be a huge problem if they do not support it.
New Zenner
Has anyone managed to get the "£" sign working in autofacebook 2 yet?
New Zenner
knuckle-101:
Did you follow this guide? It has step by step instructions and still confirmed working. Also be sure your host allows JSON to connect but JSON is pretty much obsolete for facebook appilications so it should not be a huge problem if they do not support it.
ok now it works! Thx a lot! :clap:
New Zenner
sergiojg:
I did the intallation without problems but now when i add an item on my zencart it say. Facebook was successfully updated! but in my facebook i don't see nothing. any idea ??
Same problem here any help would be greatly appreciated
New Zenner
3dsgiftsnThings:
Same problem here any help would be greatly appreciated
I have the same problem, it's not showing up on FB at all.
Totally Zenned
kashyyyk:
I moved my autoFacebook low on the update_product.php page so my items will update even when I edit an item because I like to duplicate and edit for new items, but sometime I just change quantities because of ebay sales and don't want them to update at facebook as a new item, sometimes I have zero quantity and don't want to disable the item.
I changed some files, just so you know, I know just enough PHP to get me in trouble sometimes.
I may add to the lanquage files later, but for me this works
Here is what I edited-
admim/includes/modules/product/
collect-Info.php
preview_info.phpcollect-Info.php- I added in **bold **and where
<tr>
<td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
[B] <tr>
<td class="main">Facbook Update </td>
<td class="main"> <input type="checkbox" name="facebook_update" value="Yes" />Check for yes</td>
</tr>[/B] <tr>
<td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_weight', $pInfo->products_weight); ?></td>
</tr>
> ```
//auto replace with defined missing image
if ($_POST['products_image_manual'] != '') {
$products_image_name = $_POST['img_dir'] . $_POST['products_image_manual'];
$pInfo->products_name = $products_image_name;
}
if ($_POST['image_delete'] == 1 || $products_image_name == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
echo zen_image(DIR_WS_CATALOG_IMAGES . PRODUCTS_IMAGE_NO_IMAGE, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description;
} else {
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;
}
?>
[B]<!--BO FACEBOOK-->
</tr><tr>
<td><hr></td>
</tr><tr>
<td class="smallText">
<?php
if ($facebook_update == "Yes") {
echo "Facebook Will be Updated.";
} else {
echo "Facebook Will NOT be Updated.";
}
?>
</td> </tr>
<tr>
<!--EO FACEBOOK-->[/B]
</td>
</tr>
<?php
if ($pInfo->products_url) {
?>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td>
</tr>
<?php
```admim/includes/modules/
>
> update_product.php around the autofacebook code
> ```
[B]if ($facebook_update == "Yes") {[/B]
//AutoFacebook light
$pageID = "edited"; //received when signing up.
// no need to edit below this line
$prod_vars = array(
'page' => $pageID,
'prod_image' => $_POST['products_image'],
'price' => $products_price,
'prod_name' => $_POST['products_name'][$_SESSION['languages_id']],
'prod_description' => $_POST['products_description'][$_SESSION['languages_id']],
'prod_url' => '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id, );
$url = "http://apps.htmyell.com/fbpageid/sendvars.php";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $prod_vars);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
if (isset($result['success'])){ $messageStack->add_session('Facebook was successfully updated!', 'success');}
else if (isset($result['error'])){ $messageStack->add_session('Facebook Error: '.$result['error'], 'error'); }
else { $messageStack->add_session('Error: '. $result, 'error'); }
//end of autoFacebook
}
[B]else
{
}[/B]
```Actually in the if else, I don't know if something has to be placed in there when the box isn't checked.
>
> No database updates needed, but make copies of the three files edited incase you have to go back and use them
>
> Dan
Hi Dan,
I am not sure how you have gotten this to work with the code you have provided, there are many reasons why this doesn't work - too many to list.
I do have it working 100% correctly, it will add to Facebook when creating a new product from scratch or when updating a product and both methods are configurable in the create/update product page in the admin.
There is a fair amount to alter to get it to work, but the payoff is totally worth it. No more will you update FB every time you update a product. And now you can select which products to add to FB if you don't want every product added.
I will put together a post with the details of what to do and will also package it and update the contribution in the downloads area.
Totally Zenned
Dawl:
I have the same problem, it's not showing up on FB at all.
To all that are having this problem, I have had it too and had to revert to the mod in the free downloads instead of the lite version. The version in the downloads does work.
New Zenner
Hi, I just attempted to install this addon, and I followed all the instructions that were included, but when I get to step 8, to upload the file and run it, I get this:
Parse error: syntax error, unexpected T_NEW in /homepages/25/d210379780/htdocs/GarterShop/facebook_authorization.php on line 14
This is lines 10-18 from the facebook_authorization.php page, I don't know if it's needed for me to include it in this post, but I am just incase it needs to be seen.
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
if (!function_exists('curl_init')) {
throw new Exception('Facebook needs the CURL PHP extension.');
}
if (!function_exists('json_decode')) {
throw new Exception('Facebook needs the JSON PHP extension.');
}
New Zenner
Regarding my last message: I found the problem, my PHP needed to be upgraded, so I went ahead and upgraded it and I was able to access the facebook_authorization.php page. Now the problem I am having is, when I submit a new product, it just takes me to a blank white page. It does not list the product to my shop or facebook.
New Zenner
Hi,
I have mulitple fan pages with FB accounts and I need to publish on particular page dynamically.
So I am thinking to do in this way:
I have executed facebook_authorization.php script to get access_token value but getting following error:
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in XXXX\autofacebooknew1\facebook_authorization.php on line 532
Could anyone please let me know how to fix this error?
Page tokens: How can I get particular page id and/or page token values when there are multiple pages?
access_tokens: I am able to get access_token value using a curl script. Is it enough to publish on particular page? I mean - no permission request dialogue needed?
Please help. Thanks in advance.
Regards,
Naresh Kumar N
Totally Zenned
nareshap:
Hi,
I have mulitple fan pages with FB accounts and I need to publish on particular page dynamically.
So I am thinking to do in this way:
- Getting access_token in curl
- Getting pageid and page token
- Executing update_product.php in cron job
I have executed facebook_authorization.php script to get access_token value but getting following error:
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in XXXX\autofacebooknew1\facebook_authorization.php on line 532
Could anyone please let me know how to fix this error?
Page tokens: How can I get particular page id and/or page token values when there are multiple pages?
access_tokens: I am able to get access_token value using a curl script. Is it enough to publish on particular page? I mean - no permission request dialogue needed?
Please help. Thanks in advance.
Regards,
Naresh Kumar N
Sometimes you just need to read through the thread to find your answer.
WHOSYOURDADDY:
What I have figured out so far is that according the the Face book Graph API each fan page has its own Page ID It but also needs to have its own access token to have the required extended permissions needed for this mod to be able to access the correct fanpage.
When Facebook redirects back to the requesting script during authorization, the script needs to be able to provide the proper access token for the specific fan page.
WHOSYOURDADDY:
IMPORTANT UPDATE FOR THOSE WHO MANAGE SEVERAL FACEBOOK PAGES
Like most I have been scratching my head on how to get this app from Jamielife (Thanks Jamielife:cool:) to post new products in our zen cart to the proper Fan Page/Business Page.
Each fan page has its own page id and access token. The easy part was getting the page ID the hard part was figuring out how to get the the access token for the specific page.
After you have gone through the initial steps outlined by Jamielife to get the app authorized the next steps will allow you to have this app post to the page of your choosing.
Here is the solution.:
- Run this link in your Browser. Please replace
URLwith your connect URL (Facebook Application dialog) andAPPIDwith your application IDYou will need to add https// to the following links
If done correctly you get your zen cart with the URL Parameter Access Token
This URL will return to you a URL parameter access_token.
Save the token somewhere;
Load This URL. Replace
TOKENwith the token received from Facebook at point 2.As a result you will get the json with all your pages and all access tokens. Save them somewhere;
Once you have this data it is simple going into the update_product.php at lines 88-92 and change them according to the information associated with the specific page that you want to mod to post to.
Test to make sure it works
I have tested it on 1.3.9f with the latest version of Jamielife's mod with success :clap:
Good Luck
New Zenner
I was going to add this app, but unfortuantely facebook wants a credit card number or cell phone number. I'm not giving them either one.
Totally Zenned
PullingOutHair:
I was going to add this app, but unfortuantely facebook wants a credit card number or cell phone number. I'm not giving them either one.
I wonder when they stated that. I haven't heard of it until now. Must be something new they started.
Fields marked required must be completed.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.