-
Re: AutoFacebook [Support]
Hi Folks,
Just installed version 2 on http://www.kiwisouvenirs.com linked to facebook group http://www.facebook.com/pages/New-Ze...7449840?ref=mf
The installation was straight forward and much easier than version 1.
Big THANK YOU to Jamie for providing us non programmers with a great marketing tool.
Paul
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
hello,
autoFacebook 2.0 is now available! :clap:
This should fix the API Error Code: 100 issue a lot of people are having.
And hopefully a lot of other stuff as well.
It will also now give you Zen-Cart style messages letting you know what went wrong or if it was a success when you add a product.
it's been uploaded to the contirbutions section but for those of you who don't want to wait it's available at
http://htmyell.com/autofacebook-2-0/
As always I will try my best to support this via this thread and my site.
Let me know what you think,
Jamie
Jamie thank you for updating the module works great except one thing. I can not get it to pull the item description for some reason. It will just post the item name, price, picture and link but no description. Any help would be appreciated. Thank you.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
Jamie thank you for updating the module works great except one thing. I can not get it to pull the item description for some reason. It will just post the item name, price, picture and link but no description. Any help would be appreciated. Thank you.
Hmmm, try changing line 104 to:
PHP Code:
$prod_description = implode(" ", $_POST['products_description']);
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Hmmm, try changing line 104 to:
PHP Code:
$prod_description = implode(" ", $_POST['products_description']);
Hi Jamielife that didn't work either. You can see what i'm talking about here. Thank you again
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
Hi Jamielife that didn't work either. You can see what i'm talking about
here. Thank you again
Ok how bout just:
PHP Code:
$prod_description = $product_description[1];
or
PHP Code:
$prod_description = $_POST['products_description'][1];
-
Re: AutoFacebook [Support]
Feature Request - Is it possible to somehow limit how many post per day? We literarily add 100s of products if not 1000s to our site on a weekly basis. Updating our Facebook page with every new product will drive our fans crazy and definitely will pass as a spam.
Thanks!
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
BlessIsaacola
Feature Request - Is it possible to somehow limit how many post per day? We literarily add 100s of products if not 1000s to our site on a weekly basis. Updating our Facebook page with every new product will drive our fans crazy and definitely will pass as a spam.
Thanks!
It is possible i'll look into it for the next release. Good idea.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Ok how bout just:
PHP Code:
$prod_description = $product_description[1];
or
PHP Code:
$prod_description = $_POST['products_description'][1];
Hi jamielife thank you for the help. I tried both the other codes still nothing. I have racked my brain on this but still unsuccessful.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
Hi jamielife thank you for the help. I tried both the other codes still nothing. I have racked my brain on this but still unsuccessful.
Just about all those work for me.
Maybe try adding
PHP Code:
echo "<pre>";
var_dump($_POST['products_description']);
exit;
just before
somewhere around line 90-ish
let me know what it says
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Just about all those work for me.
Maybe try adding
PHP Code:
echo "<pre>";
var_dump($_POST['products_description']);
exit;
just before
somewhere around line 90-ish
let me know what it says
getting close, but the product will not insert now. It shows this when trying to insert product.
Quote:
array(1) {
[1]=>
string(499) "
[FONT=\"VERDANA,]Stylish serving is a snap with this country themed Lazy Susan! Jaunty rooster motif brightens any gathering with down home charm; smoothly rolling turn table gives guests fingertip access to their favorite treats. [/FONT][FONT=\"VERDANA,]Weight 4.6 lbs. Tempered glass and stainless steel. 14" diameter x 1" high.[/FONT]
"
}
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
getting close, but the product will not insert now. It shows this when trying to insert product.
Yeah it was designed to do that, I just needed to see the structure of the products_description array.
Go a head and delete those 3 lines for now.
I'm looking into this.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Yeah it was designed to do that, I just needed to see the structure of the products_description array.
Go a head and delete those 3 lines for now.
I'm looking into this.
Thanks you
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
getting close, but the product will not insert now. It shows this when trying to insert product.
this is kind of a shot in the dark but try changing around line 120 where you see:
PHP Code:
'description' => $prod_description,
to:
PHP Code:
'description' => $_POST['products_description'][1],
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
this is kind of a shot in the dark but try changing around line 120 where you see:
PHP Code:
'description' => $prod_description,
to:
PHP Code:
'description' => $_POST['products_description'][1],
That does not work either Jamielife.
-
Re: AutoFacebook [Support]
Another issue I found when loading the facebook_authorization.php
Code:
Strict Standards: main() [function.main]: 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/New_York' for 'EDT/-4.0/DST' instead in /home/xxxx/public_html/facebook_authorization.php on line 970
Notice: Undefined offset: 0 in /home/xxxx/public_html/facebook_authorization.php on line 970
Success!
Your page's ID is:
Strict Standards: main() [function.main]: 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/New_York' for 'EDT/-4.0/DST' instead in /home/xxxx/public_html/facebook_authorization.php on line 972
Notice: Undefined offset: 0 in /home/xxxx/public_html/facebook_authorization.php on line 972
Your page's Token is:
Now just copy and paste these codes to the included update_product.php.
Note: if you see a period (or any other punctuation) at the end of your page token please copy and paste that as well as it is part of the token.
This is for another site I tried it on
Code:
Notice: Undefined offset: 0 in /home/xxxx/public_html/facebook_authorization.php on line 970
Success!
Your page's ID is:
Notice: Undefined offset: 0 in /home/xxxx/public_html/facebook_authorization.php on line 972
Your page's Token is:
Now just copy and paste these codes to the included update_product.php.
Note: if you see a period (or any other punctuation) at the end of your page token please copy and paste that as well as it is part of the token.
Any idea what maybe causing this?
-
Re: AutoFacebook [Support]
Turn erorr reporting off and now getting this via ftp
Code:
[30-Aug-2010 02:30:58] PHP Fatal error: Uncaught QueryParseException: An active access token must be used to query information about the current user.
thrown in /home/xxxx/public_html/facebook/facebook_authorization.php on line 532
Only thing is I have checked the ID and Secret a hundred times
-
Re: AutoFacebook [Support]
-
Re: AutoFacebook [Support]
When running the facebook_authorize.php I get the following error and cannot proceed to the success page to get the page's ID and page's token
Quote:
{
"error": {
"type": "OAuthException",
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration."
}
}
here is the info that I have entered as per instructions
1. on facebook created application: http://www.facebook.com/apps/applica...37653992944479
2. Facebook Application Web Site: Site URL: http://www.my-chef.org/cart/
Site Domain: my-chef.org
3. Facebook Intergration: uncheck users and checked Facebook Pages left everything else blank
4. I get my Application ID" and "Application Secret"
5. I insert those values into the facebook_authorize.php and upload to temp directory http://my-site.org/facebook/ and run file
The error quoted above is the return from running the script.
Does anyone have any suggestions as to what I have done incorrectly and maybe able to assist me in correcting this error?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
WHOSYOURDADDY
When running the facebook_authorize.php I get the following error and cannot proceed to the success page to get the page's ID and page's token
here is the info that I have entered as per instructions
1. on facebook created application:
http://www.facebook.com/apps/applica...37653992944479
2. Facebook Application Web Site: Site URL:
http://www.my-chef.org/cart/
Site Domain: my-chef.org
3. Facebook Intergration: uncheck users and checked Facebook Pages left everything else blank
4. I get my Application ID" and "Application Secret"
5. I insert those values into the facebook_authorize.php and upload to temp directory
http://my-site.org/facebook/ and run file
The error quoted above is the return from running the script.
Does anyone have any suggestions as to what I have done incorrectly and maybe able to assist me in correcting this error?
Did you add your domain to the application settings under "WebSite" inside the facebook app?
4. For now we need to click "Web Site" on the left and edit our "Site URL" and our "Site Domain".
The Site URL is simply your store's web address followed by a '/' forward slash. So it should look something like "http://mystore.com/"
Your Site Domain is just your domain name 'dot' whatever and could look like "mystore.com". No "http://", no "www.", and no "/"
-
2 Attachment(s)
Re: AutoFacebook [Support]
Thank you for your response Yes I have added as instructed the domain name in the Web Site tab of the application (image(s) attached for verification) as well as for the Facebook Integration
code from the facebook_authorization.php which is uploaded into the directory facebook on the my-chef.org site
Quote:
//edit with your info
$app_id = "137653992944479"; //given when you created app
$app_secret = "2724333d3ea0a08ec5149cd4b0db8a88"; //given when you created app
$app_location = "http://my-chef.org/facebook/facebook_authorization.php"; //full path to location of this file. see step 7
//no need to edit below this line
Note in rerunning the script again I now have received a success along with page id and page token.
I'm not sure what was going on but I am sure happy for the positive results.
Thank you for your response!!!
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
WHOSYOURDADDY
Thank you for your response Yes I have added as instructed the domain name in the Web Site tab of the application (image(s) attached for verification) as well as for the Facebook Integration
code from the facebook_authorization.php which is uploaded into the directory facebook on the my-chef.org site
Note in rerunning the script again I now have received a success along with page id and page token.
I'm not sure what was going on but I am sure happy for the positive results.
Thank you for your response!!!
Glad you got it work out., but never put your actually facebook
app_id number, app_secret number down so other people can see it, Big mistake. I would delete that application and make another one if this is your actual numbers.
-
1 Attachment(s)
Re: AutoFacebook [Support]
Error Facebook Error: (#100) description parameter length invalid
I need to know because when I actualize a item, zencart send me this error!
thanks.
-
Re: AutoFacebook [Support]
A big THANK YOU! for you Jamie.
Installation work like a charm.
http://www.goldpals.com/wcms/themes/...hank_you18.jpg
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
Glad you got it work out., but never put your actually facebook
app_id number, app_secret number down so other people can see it, Big mistake. I would delete that application and make another one if this is your actual numbers.
Thank you for the advice and I'll do just that - makes for good practice anyway LOL
again Thank you for you response and advice!
-
Re: AutoFacebook [Support]
I must be the biggest dummy here. I have gotten through the installation part. Received the page ID and Page token placed that into the update_products.php where instruction uploaded that back to my server.
I have gone back to Facebook added the application to my business page as favorites page or should I have just added it to my page?
I am creating test products for the purpose of testing the upload feature. From the admin side of zen cart when I add the test product zen carts shows that facebook has been successfully updated. When I go to the application profile or any of my business/personal pages to check for it I can not see where the test product has been posted
I have read through this thread and changed the update_product.php from the one supplied in the mod to the original and inserted the facebook code at line 88. still I see no updates on facebook.
I know I must be the biggest dummy here but maybe someone can help me figure out what I am doing wrong since there are so many that have gotten this to work properly.
I've talked to my web host he says he has JSON cURL and running PhP 5+ installed on the server and I am using zen cart version 1.39f
-
Re: AutoFacebook [Support]
Hi Jamie.
Installation V2 on 1.3.8a works a charm.
Quick question - what do I need to tweak in the code for the price to be quoted INCLUDING tax on facebook? Currently quotes excluding tax which is a bit backwards for the Aussie market. I can see it creating confusion!
-
Re: AutoFacebook [Support]
This has got me really confused apparently its working but publishes to the wrong page.
Well at least I have something to go on here LOL
-
1 Attachment(s)
Re: AutoFacebook [Support]
Hello, Now, I have to install AutoTwitter, above Autofacebook, but, "update_product.php" with alone Autotwitter, run ok, but
If I run autofacebook and autotwitter, it (autotwiter), don't actualize the comments in the wall (please see the picture).
Thanks.
-
Re: AutoFacebook [Support]
Here are a couple of the pages I manage on Facebook
The one that I am trying to get zen cart auto publish too is this one.
http://www.facebook.com/pages/Mychef...020370?ref=sgm
The one that it is publishing to is this one.
http://www.facebook.com/pages/Mychef...568598?ref=sgm
Does anyone know enough about Facebook that can help me understand why this is publishing to one but not to all my pages?
-
Re: AutoFacebook [Support]
I manage multiple pages. this new update was very streamlined and very easy to implement. But it's not updated the correct page. How do i designate which page the AutoFacebook updates?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
cavatappo
I manage multiple pages. this new update was very streamlined and very easy to implement. But it's not updated the correct page. How do i designate which page the AutoFacebook updates?
Are you referring to your main profile page?
As of right now it seems it is a requirement to create a new Page on facebook to make this work where the application you create on Facebook, it does not like to update your main profile for some reason but this is not mod related as far as I can tell.
-
Re: AutoFacebook [Support]
If I run autofacebook and autotwitter, it (autotwiter), don't actualize the comments in the wall (please see the picture).
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
bluedotted
Are you referring to your main profile page?
As of right now it seems it is a requirement to create a new Page on facebook to make this work where the application you create on Facebook, it does not like to update your main profile for some reason but this is not mod related as far as I can tell.
Not my main profile page. I maintain 7 different business fanpages. When i set this up, it automatically posted to the wrong fanpage. How do I change which fanpage it autoposts to? It was not good for the dinner special to be posted on the spanish harlem movie page. :)
-
Re: AutoFacebook [Support]
Attempting to run facebook_authorization.php and received the following error:
Notice: Undefined offset: 1 in C:\Inetpub\shopping.imagineighborhoods.com\facebook_authorization.php on line 956
Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed thrown in C:\Inetpub\shopping.imagineighborhoods.com\facebook_authorization.php on line 599
I got to the facebook login page ok, logged in, clicked the "Allow" button, then received this error. I'm on zen-cart v1.3.9f, fresh install of AutoFacebook 2.0, PHP 5.2 build 3790, with:
- CURL (libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3 )
- gd2 (bundled (2.0.28 compatible) )
- JSON 1.2.1
- MySQL 5.0.22
My platform is Windows Server 2003, IIS6.
Any help would be appreciated.
-
Re: AutoFacebook [Support]
Resolved the SSL Error above shortly after I posted it. Problem was that cURL needed an updated CA list. Used http://davidwalsh.name/php-ssl-curl-error to help with the fix.
To fix:
Step 1. Goto http://curl.haxx.se/docs/caextract.html downlaod cacert.pem and add it to your PHP root directory.
Step 2. Modify facebook_authorization.php by adding the following code right after any occurance of curl_init();
PHP Code:
curl_setopt($ch,CURLOPT_CAINFO,"C:\PHP\cacert.pem");
Where C:\PHP\ is your path to your PHP root.
Step 3. Make the same modification from Step 2 to the following file: admin\includes\modules\facebook\facebook.php
Once I made these mods, Auto Facebook works like a charm.
I didn't get a chance to try this, however, it may be possible to use the direct link to the cacert.pem file http://curl.haxx.se/ca/cacert.pem in the curl_setopt code.
-
cannot insert product in autofacebook version 1
It looks the old autofacebook version 1 doesn't work any more. I cannot insert new products to my website. It showed a HTTP 500 Internal server error page. But i can still update exsiting products.
But, when I delete all the autofacebook code from update_product.php in admin/includes/modules, I can insert products again. Anybody has the same problem?
-
Re: cannot insert product in autofacebook version 1
Quote:
Originally Posted by
lina0962
It looks the old autofacebook version 1 doesn't work any more. I cannot insert new products to my website. It showed a HTTP 500 Internal server error page. But i can still update exsiting products.
But, when I delete all the autofacebook code from update_product.php in admin/includes/modules, I can insert products again. Anybody has the same problem?
You need to Upgrade to version 2
-
Re: AutoFacebook [Support]
Does anyone know how to designate which fanpage the autofacebook module posts to?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Yeah it was designed to do that, I just needed to see the structure of the products_description array.
Go a head and delete those 3 lines for now.
I'm looking into this.
jamielife did you happen find a fix yet? Thank you in advance
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
cavatappo
Does anyone know how to designate which fanpage the autofacebook module posts to?
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.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
jamielife did you happen find a fix yet? Thank you in advance
No sadly I haven't. I can't reproduct the problem myself on my servers to test anything, so it make's it much harder to find a solution.
I think that because of this, the problem is random and probably based on settings in your server's php.ini file. I have asked developers better than me and we all seem to be stumped on this.
The variale info is there and obviously fine (judging by from var_dump). Something is happening when it's being sent to facebook.
Perhaps you could try encoding the data;
find line 104 where you see:
PHP Code:
$prod_description = $_POST['products_description'][$_SESSION['languages_id']];
and add a new line under it that looks like;
PHP Code:
$prod_description = urlencode($prod_description);
I'm sorry I can't be more help on this.
Also, thanks for helping out on the forum!
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
Hobby Link
Hi Jamie.
Installation V2 on 1.3.8a works a charm.
Quick question - what do I need to tweak in the code for the price to be quoted INCLUDING tax on facebook? Currently quotes excluding tax which is a bit backwards for the Aussie market. I can see it creating confusion!
I'm not too familiar with all the zencart tax stuff but I would imagine find:
PHP Code:
$price = $products_price;
around line 101 of your update_product.php file and change it to:
PHP Code:
$price = $_POST['products_price_gross'];
I think that should do it.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
bluedotted
Turn erorr reporting off and now getting this via ftp
Code:
[30-Aug-2010 02:30:58] PHP Fatal error: Uncaught QueryParseException: An active access token must be used to query information about the current user.
thrown in /home/xxxx/public_html/facebook/facebook_authorization.php on line 532
Only thing is I have checked the ID and Secret a hundred times
Have you made any progress on this? Are you getting to the facebook allow access page?
somethings to check;
- make sure the domain is set up correctly and the script is hosted on the domain specified durring set up
- check all vars (id, urls, etc)
- make sure have JSON installed
- make sure that the page is linked to an actual user account.
let me know if that helps.
Also thanks as well for helping out on the forum.
-
Re: AutoFacebook [Support]
Problem has been solved, I contacted the web host and they found the issue and fixed it, according to them they already contacted you about the Facebook App not completely being created from the facebook side of the process.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
bluedotted
Problem has been solved, I contacted the web host and they found the issue and fixed it, according to them they already contacted you about the Facebook App not completely being created from the facebook side of the process.
Haha, Yeah never heard from them. Not sure what they mean by that. The app follows all of facebooks guidelines for authorizing access to a user's page. It also uses the facebook recomended php-sdk. Think they were just trying to point the finger to someone else.
Anyway glad you got it working.
and thanks again.
-
Re: AutoFacebook [Support]
-
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.
I inserted the number to the fan page and the following error in zen cart was generated
Quote:
Facebook Error: (#200) Posts where the actor is a page cannot also include a target_id
-
Re: AutoFacebook [Support]
Hi Jamie,
Thanks for the updated version.
Ive got a couple of issues.
1. The currency symbol doesnt appear
2. Can't get the description to show either. Ive tried all that has been suggested on here and the closest i got was using one of the different lines of code it came up with "null" in the description.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
WHOSYOURDADDY
I inserted the number to the fan page and the following error in zen cart was generated
Checking with Facebook Developer Wiki the 200 error code is a "Permissions error" code.
In addition to the Page Id change suggested does the Page token need to be changed as well? I'm looking into whether that is possible during the authorization setup.
If I figure that out I'll post the results here.
-
Re: AutoFacebook [Support]
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.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
deathman2006
Hi Jamie,
Thanks for the updated version.
Ive got a couple of issues.
1. The currency symbol doesnt appear
2. Can't get the description to show either. Ive tried all that has been suggested on here and the closest i got was using one of the different lines of code it came up with "null" in the description.
Can't get the description to show either. Ive tried all that has been suggested on here and the closest i got was using one of the different lines of code it came up with "null" in the description
I'm having the same issue with the "null" as you are. I think we might have to live without having a description. If I go to my site and press the facebook share button it sends the description. I don't know.
-
Re: AutoFacebook [Support]
I added the auto facebook code and my auto tweet code to my updateproduct file, and twitter updates fine (actually I get the message that both have been updated), but it's not showing up on my Facebook store page. What am I doing wrong do you think?
I entered all the codes and numbers that I was given correctly, so I know it isn't that. :(
Help!
Joanne
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
joannem
I added the auto facebook code and my auto tweet code to my updateproduct file, and twitter updates fine (actually I get the message that both have been updated), but it's not showing up on my Facebook store page. What am I doing wrong do you think?
I entered all the codes and numbers that I was given correctly, so I know it isn't that. :(
Help!
Joanne
That does seem odd. Does the facebook code work without the twitter code? and Do you have more than one page? Is anywhere else on facebook receiving the updates?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
That does seem odd. Does the facebook code work without the twitter code? and Do you have more than one page? Is anywhere else on facebook receiving the updates?
Url encoding didnt work i take it? grrr
Well, I'm thinking it has something to do with the way cURL is configured on varius servers. It's the only thing I can think of that would cause the same line of code to work on some servers and not on others. Obviously the variable has the information, it just isn't being sent.
What hosting do you use and do they give any cURL specific examples/instructions?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Url encoding didnt work i take it? grrr
Well, I'm thinking it has something to do with the way cURL is configured on varius servers. It's the only thing I can think of that would cause the same line of code to work on some servers and not on others. Obviously the variable has the information, it just isn't being sent.
What hosting do you use and do they give any cURL specific examples/instructions?
LOL, you know what, it works perfectly, except it posted it to another page that I'm an admin on. Sooo I've removed myself as admin from those other pages and now I'm going to try it again :P
-
Re: AutoFacebook [Support]
***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.:
1. Run this link in your Browser. Please replace ~URL~ with your connect URL (Facebook Application dialog) and ~APPID~ with your application ID
You will need to add https// to the following links
Quote:
graph.facebook.com/oauth/authorize?type=user_agent&client_id=~APPID~&redirect_uri=~URL~&scope=publish_str eam,offline_access,manage_pages
If done correctly you get your zen cart with the URL Parameter Access Token
2. This URL will return to you a URL parameter access_token.
3. Save the token somewhere;
4. Load This URL. Replace ~TOKEN~ with the token received from Facebook at point 2.
Quote:
graph.facebook.com/me/accounts?access_token=~TOKEN~
5. 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
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
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.:
1. Run this link in your Browser. Please replace ~URL~ with your connect URL (Facebook Application dialog) and ~APPID~ with your application ID
You will need to add https// to the following links
If done correctly you get your zen cart with the URL Parameter Access Token
2. This URL will return to you a URL parameter access_token.
3. Save the token somewhere;
4. Load This URL. Replace ~TOKEN~ with the token received from Facebook at point 2.
5. 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
You can do this, but you don't have to as you've already allowed your app to access all your pages.
You could just take the individual page's number (which will be in your browser's address bar when you navigate to the facebook page):
http://htmyell.com/images/share/fbnumber.jpg
and fill it in for line 96 where you see:
PHP Code:
$page_id = "Your page ID";
-
Re: AutoFacebook [Support]
Ok so this MIGHT fix it:
However, I can't recreate the problem so I am unable to test.
I think that it is server related and has to do with DNS/cURL settings. So if you're having a problem where something isn't getting posted to facebook (but just about everything else is) Download: http://htmyell.com/images/share/autoFacebook_fix.zip extract the included facebook.php file and replace the facebook.php file located on your server in: "admin/includes/modules/facebook/"
You don't need to change anything else, this will just change the core facebook api fille.
Once you replace it, hopefully everything will work.
...fingers crossed...
Please let me know.
NOTE: This is not an upgrade to the existing autoFacebook 2 mod, it is just a potential fix for those people having issues with the current mod. If everything works fine for you, you do not need to download this.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Ok so this
MIGHT fix it:
However, I can't recreate the problem so I am unable to test.
I think that it is server related and has to do with DNS/cURL settings. So
if you're having a problem where something isn't getting posted to facebook (but just about everything else is) Download:
http://htmyell.com/images/share/autoFacebook_fix.zip extract the included facebook.php file and replace the facebook.php file located on your server in: "admin/includes/modules/facebook/"
You don't need to change anything else, this will just change the core facebook api fille.
Once you replace it, hopefully everything will work.
...fingers crossed...
Please let me know.
NOTE: This is not an upgrade to the existing autoFacebook 2 mod, it is just a
potential fix for those people having issues with the current mod. If everything works fine for you, you do not need to download this.
Still doesn't post the description of the product..
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
No sadly I haven't. I can't reproduct the problem myself on my servers to test anything, so it make's it much harder to find a solution.
I think that because of this, the problem is random and probably based on settings in your server's php.ini file. I have asked developers better than me and we all seem to be stumped on this.
The variale info is there and obviously fine (judging by from var_dump). Something is happening when it's being sent to facebook.
Perhaps you could try encoding the data;
find line 104 where you see:
PHP Code:
$prod_description = $_POST['products_description'][$_SESSION['languages_id']];
and add a new line under it that looks like;
PHP Code:
$prod_description = urlencode($prod_description);
I'm sorry I can't be more help on this.
Also, thanks for helping out on the forum!
I tried this and it almost works. Here what the description looks like when posting to facebook.
All In One Media Center
Price: $275.90
%3Cp%3E%3Cspan+style%3D%5C%22font-size%3A+small%3B%5C%22%3E%3Cstrong%3E%3Cfont+color%3D%5C%22%23000000%5C%22%3ECol orful+++entertainment+credenza+puts+a+full+function+media+center+anywhere+you+
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
I tried this and it almost works. Here what the description looks like when posting to facebook.
All In One Media Center
Price: $275.90
%3Cp%3E%3Cspan+style%3D%5C%22font-size%3A+small%3B%5C%22%3E%3Cstrong%3E%3Cfont+color%3D%5C%22%23000000%5C%22%3ECol orful+++entertainment+credenza+puts+a+full+function+media+center+anywhere+you+
hmm... try
deleting:
PHP Code:
$prod_description = urlencode($prod_description);
and adding:
PHP Code:
settype($prod_description , "string");
in it's place
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
hmm... try
deleting:
PHP Code:
$prod_description = urlencode($prod_description);
and adding:
PHP Code:
settype($prod_description , "string");
in it's place
Back to the same place I was before.
The Good Shepherd Store Has a new product available!
6 Piece Nonstick Cookware Set
Price: $24.65
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
You can do this, but you don't have to as you've already allowed your app to access all your pages.
You could just take the individual page's number (which will be in your browser's address bar when you navigate to the facebook page):
http://htmyell.com/images/share/fbnumber.jpg
and fill it in for line 96 where you see:
PHP Code:
$page_id = "Your page ID";
I'm not talking about the User Access Token - have you tested through your method to insure that it works as you prescribe?
According to my post in this thread (post #147) when I tested using your prescribed method FB gives back an error code of 200
As I stated in my post here in this thread (post #149) according to FB Developers Wiki error 200 is a permission error.
So yes you have the User Access Token that allows posting through the admin privileges granted for that fan page but by not changing the page access token that is different for each page, to the specific access token for that page FB will not allow access by the script.
what you will see in the page access token is the following
Quote:
Application Number|user ID and User Access Token|Fan Page ID|Fan Page Access Token
the Application Number, User ID and User Access Token remains the same but the Page ID and Page Access Token are what changes from fan page to fan page.
Think about it, it is a extra level of security to help insure fraudulent access and posting onto face book does not occur
Quote:
{
"name": "Bugs Bunny Frontier",
"category": "Websites",
"id": "29469045921",
"access_token": "some secret string."
"name": "Daffy Duck Play Pen",
"category": "Websites",
"id": "15326801473",
"access_token": "some secret string."
"name": "Mother Goose Brothel",
"category": "Websites",
"id": "19785012358",
"access_token": "some secret string."
},
The above information is what is gleamed from FB by using the procedure I have outlined earlier.
So by simple changing the page ID without changing the page access token that matches produces an FB error code of 200 (Permission Denied) when the update_product.php is called when adding a new product to the zen cart.
When the facebook authorization runs for the first time, FB will look at what session was last used and stored in the cookie session on the users computer to determine which page ID and associated page access token to authorize. Which for those such as myself that mange several pages my not be the one that we want the cart to post to.
I'm not a programmer but I am one hell of a researcher.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
I tried this and it almost works. Here what the description looks like when posting to facebook.
All In One Media Center
Price: $275.90
%3Cp%3E%3Cspan+style%3D%5C%22font-size%3A+small%3B%5C%22%3E%3Cstrong%3E%3Cfont+color%3D%5C%22%23000000%5C%22%3ECol orful+++entertainment+credenza+puts+a+full+function+media+center+anywhere+you+
Wait a minute, why is there HTML/CSS in your product description? Are you using a WYSIWYG editor or hand coding HTML in your descriptions or something like that? What other mods have you installed to your Zen-Cart?
I'm willing to bet that's the problem.
-
Re: AutoFacebook [Support]
So instead of:
PHP Code:
$prod_description = urlencode($prod_description);
Try:
PHP Code:
$prod_description = strip_tags($prod_description);
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
Wait a minute, why is there HTML/CSS in your product description? Are you using a WYSIWYG editor or hand coding HTML in your descriptions or something like that? What other mods have you installed to your Zen-Cart?
I'm willing to bet that's the problem.
I'm using editor__fckeditor_plugin_2-6-4-1 for my editor.
Here are a list of add ons I have installed.
captcha_using_ttf__gd__tel
ceon_back_in_stock2.6.0
ceon_uri_mapping_3.8.0_for_zc
css_flyout_menu_1-3-8a
email_archive_manager_1-4
footer_menu_v1-0
google base 1-8-2
image_handler__for_vx_Ver2-0rev7
links_manager_v3-5-3a
msrp_display_1-2
recover_cart_sales_3-1-0
return_authorization_v2-3-3a
rss_feed_2-1-4
simple_google_analytics_1-2-2(2)
sitemapxml__formerly_google_sitemap_2-1-0
1.7 Lightbox
about_us_page_1-3-1
css_javascript_loader
easypopulate
email_address_exporter_1-2c
email_archive_manager_1-4
emptycart_manager_1-2
faq_page_v1-0
jscroller_sidebox_package_2-1
login_box_1-5
minimum_order_1-0-1a
newsletter_subscribe_2-2
quantity_discounts_1-11
quick_configuration_edit_for_x_1-0-1
recover_cart_sales_3-1-0
return_authorization_v2-3-3a
rss_feed_2-1-4
search_log_2-0
testimonial_manager_v1-5-2
ty_package_tracker_for_x_2-3a
sitemapxml__formerly_google_sitemap_2-1-0
I think this is all.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
So instead of:
PHP Code:
$prod_description = urlencode($prod_description);
Try:
PHP Code:
$prod_description = strip_tags($prod_description);
I will test this tomorrow and let you know.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
WHOSYOURDADDY
I'm not talking about the User Access Token - have you tested through your method to insure that it works as you prescribe?
You are right, I was thinking about the authentication process for autoFacebook1. I'm starting to think I manage too many mods to keep track of em all.
I've got a fix for this developed that lets you select your page from a drop down which will be available in the next version.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
So instead of:
PHP Code:
$prod_description = urlencode($prod_description);
Try:
PHP Code:
$prod_description = strip_tags($prod_description);
Jamielift you nailed it. This code works great. The description is now sent to facebook.:clap:
Thank you for your on going effort to solve this problem. Does autoTwitter suppose to send the description to, if it is I have the same problem there. You can post you answer over there if you will. Thank You again.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
jamielife
You are right, I was thinking about the authentication process for autoFacebook1. I'm starting to think I manage too many mods to keep track of em all.
I've got a fix for this developed that lets you select your page from a drop down which will be available in the next version.
LOL it happens to the best of us - I'm just glad I was able add something positive to this thread :cool:
I have programmer friend that uses me as his beta tester for work he does - If there is a bug I will find it LMAO
It really is a great mod with a lot future development possibilities!
Now to start working on what you and countrycharm just went through on posting descriptions!!!
-
Re: AutoFacebook [Support]
Installed AutoFacebook v2, seemed to install ok, but when i add a new product in zencart at the top it informs me that Facebook was successfully updated, but nothing showing on facebook. I'v uninstalled and re installed the app 3 times without any errors showing at all but can not get anything to show in facebook at all. Anybody any ideas what i can check to try and find whats going wrong.
-
Re: AutoFacebook [Support]
I installed Version 2 a few days ago, and it is working perfectly. Also installed Autotweet, which is also working fine.
Thanks very much for this excellent modules and all your help.
Adnan Rana
PC Point Ltd
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
DesH
Installed AutoFacebook v2, seemed to install ok, but when i add a new product in zencart at the top it informs me that Facebook was successfully updated, but nothing showing on facebook. I'v uninstalled and re installed the app 3 times without any errors showing at all but can not get anything to show in facebook at all. Anybody any ideas what i can check to try and find whats going wrong.
If you mange several pages check them all to see which one it posted too!
If it is posting to the wrong page I have provided a temporary procedure to get the information you need earlier in this thread.
(post #156 on page 16 of this thread)
Jamielife is working an upgrade for those of us that manage several pages.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
Jamielift you nailed it. This code works great. The description is now sent to facebook.:clap:
Thank you for your on going effort to solve this problem. Does autoTwitter suppose to send the description to, if it is I have the same problem there. You can post you answer over there if you will. Thank You again.
YAY!!!:clap::clap::clap: Finally!
Thank you as well for being patient and working with me on so many experiments.
Quote:
Originally Posted by
adnanrana
I installed Version 2 a few days ago, and it is working perfectly. Also installed Autotweet, which is also working fine.
Thanks very much for this excellent modules and all your help.
Adnan Rana
PC Point Ltd
Thanks for sharing it's always nice to hear everything worked right.
Quote:
Originally Posted by
WHOSYOURDADDY
If you mange several pages check them all to see which one it posted too!
If it is posting to the wrong page I have provided a temporary procedure to get the information you need earlier in this thread.
(post #156 on page 16 of this thread)
Jamielife is working an upgrade for those of us that manage several pages.
I agree, odds are it's posting to another one of your pages, check that and follow WHOSYOURDADDY's instructions a page back to authenticate your new page.
-
Re: AutoFacebook [Support]
Hi all, sorry to be a pain. Ive spent 4 hours on this module and Im about to give up. Ive search all over the website and read through all 18 pages but I seem to be the only one not able to find this fbcanvas file for facebook.
I know I must be missing something extremely simple but can someone please put me out of my misery!
6. Next click "Canvas." This is important: facebook uses your canvas callback url to pull content from a page on your server and bring it into your facebook app. Essentially it runs your app as a web page from within facebook. This is going to link to your fbcanvas folder included in the downloaded autoFacebook zip. However before we can upload the fbcanvas folder to your server we have to finish what we're doing now. fbcanvas will need to be uploaded to your public/www root folder. So we'll fill in where we plan to host our fbcanvas folder. So if my store is http://www.htmyell.com, when I upload fbcanvas to my server I'll upload it to the public root directory so that it's url will be http://www.htmyell.com/fbcanvas/. So my Canvas Page url will be "htmyell_backend" (since odds are that hasn't been taken) and my Canvas Callback URL will be "http://htmyell.com/fbcanvas/". Also while you're here make sure to click "FBML" instead of "iFrame."
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
confusedforever
Hi all, sorry to be a pain. Ive spent 4 hours on this module and Im about to give up. Ive search all over the website and read through all 18 pages but I seem to be the only one not able to find this fbcanvas file for facebook.
I know I must be missing something extremely simple but can someone please put me out of my misery!
6. Next click "Canvas." This is important: facebook uses your canvas callback url to pull content from a page on your server and bring it into your facebook app. Essentially it runs your app as a web page from within facebook. This is going to link to your fbcanvas folder included in the downloaded autoFacebook zip. However before we can upload the fbcanvas folder to your server we have to finish what we're doing now. fbcanvas will need to be uploaded to your public/www root folder. So we'll fill in where we plan to host our fbcanvas folder. So if my store is
http://www.htmyell.com, when I upload fbcanvas to my server I'll upload it to the public root directory so that it's url will be
http://www.htmyell.com/fbcanvas/. So my Canvas Page url will be "htmyell_backend" (since odds are that hasn't been taken) and my Canvas Callback URL will be "http://htmyell.com/fbcanvas/". Also while you're here make sure to click "FBML" instead of "iFrame."
There is no fbcanvas folder in AutoFacebook Version 2. That was AutoFacebook Version 1 that had it. If you have downloaded that version you need to grab Version 2.
-
Re: AutoFacebook [Support]
It is the 2.0 that I have. What is the canvas bit for then on fb developers?
I did all the steps on the readme and all went ok but now im just stuck as there is no info on how to set the fb intergration up.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
confusedforever
It is the 2.0 that I have. What is the canvas bit for then on fb developers?
I did all the steps on the readme and all went ok but now im just stuck as there is no info on how to set the fb intergration up.
If you followed these instructions there is no reason to mess around with the fbcanvas. It was use before the oauth 2.0 authorization to integrate with Facebook's new Graph API calls.
autoFacebook 2.0
By: Jamie Taylor
Htmyell.com What's New:
- Added oauth 2.0 authorization to integrate with Facebook's new Graph API calls.
- Added Zen Cart integrated error checking and status alerts.
Requirements:
- Zencart 1.3.9+
- php 5+
- cURL
- JSON
License:
This Zen Cart modification is licensed under the GNU General Public License: http://www.gnu.org/licenses/gpl-3.0.txt Getting Help:
Help is available via the Zen Cart forums @ http://www.zen-cart.com/forum/showthread.php?t=153528 or at http://htmyell.com/autofacebook-2-0
Installation:
New Users:
1. Log in to your facebook account and go to http://www.facebook.com/developers and click the "+ Set up New Application" button.
2. Name your application. I suggest something like "MyStoreDomain.com" but it can be whatever you like. Agree to the terms and click "Create Application." On the next page, if required fill in the security check and click "Submit."
Note: if an error occurs simply go back you should see your application was created anyway. If so, click "edit settings" otherwise, try again.
3. Now you should see your new Application settings. You can come back and edit these later though it's not required (I'd suggest atleast uploading an Icon image once everything is working).
4. For now we need to click "Web Site" on the left and edit our "Site URL" and our "Site Domain".
The Site URL is simply your store's web address followed by a '/' forward slash. So it should look something like "http://mystore.com/"
Your Site Domain is just your domain name 'dot' whatever and could look like "mystore.com". No "http://", no "www.", and no "/"
5. Now click "Facebook Integration" on the left. Towards the bottom you should see "Installable to?". Uncheck "Users" and add a check next to "Facebook Pages" instead.
6. Now click "Save Changes". If all goes well you should see your app on the My Applications page, along your app settings. We'll need to use the "Application ID" and "Application Secret".
7. Now that we're done with our app 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 4 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.
8. 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."
9. 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.
10. 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.
11. Now upload the the new update_procut.php and the facebook folder to your store's admin/includes/modules folder on your server (or just drag the admin folder from autoFacebook2 folder to your zencart root directoy)
12. Now when you add a new product to your store your facebook will automatically be updated with the new product info. Note: you may now delete the facebook_authorization.php uploaded in step 6 as well as the temporary folder from your server.
Existing Users:
If all is fine with your old version of autofacebook, there really isn't any major improvements with this version. This version mainly address facebook's changing of the user authorization process for people who did not create their application before july 1st. However if you want to upgrade be aware of the following:
- You will have to create a new Application since the methods have changed
- I am unable to test this on any live sites running the old version of autoFacebook so to be safe and ensure maximum compatibility:
1. Delete the "facebook" folder in your admin folder.
2. Start at step 1 for new users.
Adding to autoFacebook to autoTweet.
to add to autoTweet just complete steps 1 - 10 but istead of uploading update_product.php copy lines 89 - 132 of the autoFacebook 2.0 update_product.php and paste them above line 90 (above "// start autoTweet 3.0") of your current update_product.php Adding autoTweet to autoFacebook
copy lines 90 - 157 of your autoTweet update_product.php and paste them just below line 132 (where you see "//end of autoFacebook") For more info and to give feedback check the forums.
Hope ya like it
Jamie
-
Re: AutoFacebook [Support]
Sorry I am not brilliant with facebook. I have followed all the instructions very very slowly (I started this about 5 hours ago).
I now have the app on facebook and looking at the tabs that say about, website, facebook intergration etc.
In the intergration, the profile tab and canvas sections are not filled in. Do I need to fill them in? If so, with what?
Also, I have added the app to one of my fanpages but it doesnt do anything. I do not understand how the new products on my zen can get to my facebook pages?
I really am totally lost with this.
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
confusedforever
Sorry I am not brilliant with facebook. I have followed all the instructions very very slowly (I started this about 5 hours ago).
I now have the app on facebook and looking at the tabs that say about, website, facebook intergration etc.
In the intergration, the profile tab and canvas sections are not filled in. Do I need to fill them in? If so, with what?
Also, I have added the app to one of my fanpages but it doesnt do anything. I do not understand how the new products on my zen can get to my facebook pages?
I really am totally lost with this.
Maybe I can help you.
You have your application created so the hard part is done. Yea Right whatever you say buddy LOL Actually it is
:smile:
My first suggestion don't make it any harder than necessary - Yea easy for you to say buddy LMAO
Starting with the web site profile what you see is at the top is the application ID and the application secret then directly below is site URL and Site domain
this is simple in site URL copy and paste the URL that you see in your browser when you go to your zen cart
example: http://www.yoursite.com or http://www.yoursite.com/cart/ that is it nothing more nothing less
next site domain this is the name of your domain
example yoursite.com that is it no http no www just the name of your domain
Sweet your now done with web site tab - moving on to the next tab this is even more simple since the hard part has already been taken care of in the web site tab.
Facebook Integration Tab the only thing you do and I repeat and stress the only thing you do is go to the very bottom where it says "Installable to" and uncheck the user and check facebook page
Thats it your done now click save changes
Wow pretty cool right you just did your first app!!! :clap:
Yes then add it becuase you need to make sure you have admin privileges to post to your page
Now go back to your editor and make sure that you have the update_product.php with all the correct information as outlined by Jamielife
Save that and upload to your server.
Setup a test cat and create a test product and attach an image to the product.
When you add the new product what happens is the zen cart calls the update_product.php the new autofacebook code talks to the facebook application and says hey buddy how you doing - the FB application says sweet I know you what you got for me - zen cart then instructs the application to post this new information to the page that has been authorized to accept it.
If everything went well then you will see the New Product posted to your page!!
Hope this helps this helps you out - if not I just confused the heck out of you LOL :blink:
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
WHOSYOURDADDY
Maybe I can help you.
You have your application created so the hard part is done. Yea Right whatever you say buddy LOL Actually it is
:smile:
My first suggestion don't make it any harder than necessary - Yea easy for you to say buddy LMAO
Starting with the web site profile what you see is at the top is the application ID and the application secret then directly below is site URL and Site domain
this is simple in site URL copy and paste the URL that you see in your browser when you go to your zen cart
example:
http://www.yoursite.com or
http://www.yoursite.com/cart/ that is it nothing more nothing less
next site domain this is the name of your domain
example yoursite.com that is it no http no www just the name of your domain
Sweet your now done with web site tab - moving on to the next tab this is even more simple since the hard part has already been taken care of in the web site tab.
Facebook Integration Tab the only thing you do and I repeat and stress the only thing you do is go to the very bottom where it says "Installable to" and uncheck the user and check facebook page
Thats it your done now click save changes
Wow pretty cool right you just did your first app!!! :clap:
Yes then add it becuase you need to make sure you have admin privileges to post to your page
Now go back to your editor and make sure that you have the update_product.php with all the correct information as outlined by Jamielife
Save that and upload to your server.
Setup a test cat and create a test product and attach an image to the product.
When you add the new product what happens is the zen cart calls the update_product.php the new autofacebook code talks to the facebook application and says hey buddy how you doing - the FB application says sweet I know you what you got for me - zen cart then instructs the application to post this new information to the page that has been authorized to accept it.
If everything went well then you will see the New Product posted to your page!!
Hope this helps this helps you out - if not I just confused the heck out of you LOL :blink:
Good post. I was going there next. You got there before me:yes:
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
countrycharm
Good post. I was going there next. You got there before me:yes:
LMAO I'm working on my post count so i can be totally zenned just like you - :cool:
-
Re: AutoFacebook [Support]
Thank you for the detailed reply. Ive double and treble checked all this info.
It has worked which is a good thing.
The bad thing is its worked on the wrong page. Its worked on another fanpage I admin. Ive now removed myself as an admin to that particular page and then posted up a new product and it has stopped adding to that page.
Only thing now is it wont add to any other page.
Is there something else I am doing wrong? I went to the applications page and clicked "add to my pages" and slected one page but nothing posts on it.
Help much appreciated.
Jay.
-
Re: AutoFacebook [Support]
Each page has to be independently authorized. Here are detailed instructions for those adding a different page (thanks to whosyourdaddy)
Quote:
Originally Posted by
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.:
1. Run this link in your Browser. Please replace ~URL~ with your connect URL (Facebook Application dialog) and ~APPID~ with your application ID
You will need to add https// to the following links
graph.facebook.com/oauth/authorize?type=user_agent&client_id=~APPID~&redirect_uri=~URL~&scope=publish_str eam,offline_access,manage_pages
If done correctly you get your zen cart with the URL Parameter Access Token
2. This URL will return to you a URL parameter access_token.
3. Save the token somewhere;
4. Load This URL. Replace ~TOKEN~ with the token received from Facebook at point 2.
graph.facebook.com/me/accounts?access_token=~TOKEN~
5. 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
That should fix it
-
Re: AutoFacebook [Support]
Its the connect URL my website where my shop is and do i need to include http://
If so then this is the error I got...
{
"error": {
"type": "OAuthException",
"message": "redirect_uri isn't an absolute URI. Check RFC 3986."
}
}
The APPID I am assuming is my application ID?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
confusedforever
Its the connect URL my website where my shop is and do i need to include http://
If so then this is the error I got...
{
"error": {
"type": "OAuthException",
"message": "redirect_uri isn't an absolute URI. Check RFC 3986."
}
}
The APPID I am assuming is my application ID?
This is what your URL will look like
Quote:
remember to add https:// to the beginning
graph.facebook.com/oauth/authorize?type=user_agent&client_id=Your FB App ID&redirect_uri=http://Your Site Path&scope=publish_stream,offline_access,manage_pages
Your FB App ID is the FB Application ID
Your site path is what you defined in your FB application under the Web Site Profile. http://www.yoursite.com or http://www.yoursite.com/cart/
If you have done it correctly when you activate that in your browser it will take you to your zen cart.
Look back into your browser address bar and copy and paste the entire string that you see (to be saved locally on your computer)
what you will see is something like this.
Quote:
there will be an
http://www. at the beginning
yoursite.com/#access_token=
some very long number and letter&expires_in=0
copy and paste everything between the access_token= and the &expires
this is called your URL parameter access_token - this is the big bad boy that will gleam the rest of the information that you need to tell FB what page for zen cart to access and post the new products to.
Next step take that very long string that you just copy and pasted locally and insert it into the following URL
Quote:
add https:// to the beginning of the string
graph.facebook.com/me/accounts?access_token=Your URL parameter access token
activate the string in your browser
if you have done it correctly what is then gleamed is all the fan pages that you manage, along with the page ID and Page Access token for each fan page managed
Quote:
{
"name": "Bugs Bunny Frontier",
"category": "Websites",
"id": "29469045921",
"access_token": "some secret string."
"name": "Daffy Duck Play Pen",
"category": "Websites",
"id": "15326801473",
"access_token": "some secret string."
"name": "Mother Goose Brothel",
"category": "Websites",
"id": "19785012358",
"access_token": "some secret string."
},
copy and paste this locally for future reference
Now you have the Page ID and the Associated Access Token for that page
Go back to your editor in the update_product.php
replace the Page ID with the one that matches the page you want zen cart to post to.
then replace the Page Access Token on the line directly below with the one that matches the Page ID you put in the line above.
Save and upload to your server then test - if all went well it will now be posting the page of your choosing.
Jamielife will be adding a drop down option on his next release that will make it simpler in the future to pick which page for zen cart to post to - this is only a temporary procedure for the release that is currently out for us.
-
Re: AutoFacebook [Support]
One thing I meant to say is that it is easier to make those URL changes while in your editor like notebook and then copy and paste into your web browser address bar then click to activate that string
-
Re: AutoFacebook [Support]
Thank you for your idiot guide. Was perfect. Its worked now.
New problems...
The £ doesnt show up and also, the most important thing for me, it doesnt post the music items but does do the normal items.
Any help?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
confusedforever
Thank you for your idiot guide. Was perfect. Its worked now.
New problems...
The £ doesnt show up and also, the most important thing for me, it doesnt post the music items but does do the normal items.
Any help?
I'm glad I was able to help but I'm going to half to take my Que from a Holiday Inn Express commercial - I'm not a real programmer I just play one on TV and let a real programmer step in and help you from here on out!
Good Luck!! :D
-
Re: AutoFacebook [Support]
No problem Mr DADDY! You have been a big help. I think I may just have to give up and delete it as I need to get on with the rest of the website and this is holding things up.
Its a very useful module and I am glad I found it, just seems like its no good for this project :wacko:
-
Re: AutoFacebook [Support]
I'm getting this error:
Parse error: syntax error, unexpected T_NEW in /homepages/32/d161341491/htdocs/cbellas/facebook/facebook_authorization.php on line 14
I haven't gotten any further than this. Any ideas?
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
Chaos Factor
I'm getting this error:
Parse error: syntax error, unexpected T_NEW in /homepages/32/d161341491/htdocs/cbellas/facebook/facebook_authorization.php on line 14
I haven't gotten any further than this. Any ideas?
Do you have cURL and JSON installed on your server?
-
Re: AutoFacebook [Support]
Can anyone advise as to my last query? The products post to facebook but not the music items.
Thanks in advance.
-
Re: AutoFacebook [Support]
I figured that was the problem. I use 1and1. I think they have one and not the other.
-
Re: AutoFacebook [Support]
Hi all, Finally got everything working except for the currency symbol. Nothing i do shows the £ sign at all for some reason. If anyones got any ideas id appreciate it :)
-
Re: AutoFacebook [Support]
Yea death I am still having a problem with the currency £ sign.
-
Re: AutoFacebook [Support]
1and1 has it but not for their shared hosting.(cURL & JSON) You have to have a dedicated server package. I'll have to make a whole heckuva lot more money than I am now to sign up for one of those bad boys. ($99 per month and up......I think I'm n the wrong business!!)
So much for using this app!
-
Re: AutoFacebook [Support]
Quote:
Originally Posted by
confusedforever
Yea death I am still having a problem with the currency £ sign.
I'll look into this as soon as i can.
Quote:
Originally Posted by
Chaos Factor
1and1 has it but not for their shared hosting.(cURL & JSON) You have to have a dedicated server package. I'll have to make a whole heckuva lot more money than I am now to sign up for one of those bad boys. ($99 per month and up......I think I'm n the wrong business!!)
So much for using this app!
Switch to another host. Most hosts give you both with shared hosting. I use ipower, they start at 3.95 a month or something and you get everything you need..(i think).
if you do, be sure to tell em htmyell.com sent ya :wink:
-
Re: AutoFacebook [Support]
Checked Ipower...a good deal more expensive per month than what I am paying. Any other hosts that have cURL & JSON on shared hosting? I'm paying less than $12 per month with 3 domains, unlimited bandwidth & 2500GB space. I also get the SSL thru 1and1. So if I change it's gotta save me money or at least cost the same.
-
Re: AutoFacebook [Support]
After posting that cURL and JSON were only available on dedicated servers, I received another email and I quote:
Quote:
We sincerely do apologize for the wrong information given. If you are asking if we do support curl and json, we do and it is enabled on the php 5. By default, the php version that is running on the server is php 4.
You just need to parse it to php 5 in order for those two php directives to be enabled.
Now my brain is on vacation for some flippin' reason...probably from upgrading ZC and working all the modules back into it.......but at the moment I am drawing a big flippin DER DUH. ( I feel like Homer Simpson. Got a doughnut??)
I know I've had to do this before ....when I had my brain. Just can't wrap my head around it right now!!! Maybe tomorrow.