Forums / All Other Contributions/Addons / AutoFacebook [Support]

AutoFacebook [Support]

Views: 141,424

Results 141 to 160 of 691
6 Sep 2010, 6:59 PM
#141
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

AutoFacebook [Support]

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.

6 Sep 2010, 7:20 PM
#142
bluedotted avatar

bluedotted

New Zenner

Join Date:
Oct 2008
Posts:
64
Plugin Contributions:
0

Re: AutoFacebook [Support]

Very doubtfull :)

7 Sep 2010, 7:07 PM
#143
whosyourdaddy avatar

whosyourdaddy

New Zenner

Join Date:
Oct 2009
Posts:
50
Plugin Contributions:
0

Re: AutoFacebook [Support]

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

Facebook Error: (#200) Posts where the actor is a page cannot also include a target_id

Zen Cart Version 1.39h
PHP 5

7 Sep 2010, 9:01 PM
#144
deathman2006 avatar

deathman2006

New Zenner

Join Date:
Apr 2010
Location:
London, UK
Posts:
38
Plugin Contributions:
0

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.

Clever AV Ltd
http://www.cleveravltd.co.uk
ZenCart 1.3.9g

7 Sep 2010, 11:15 PM
#145
whosyourdaddy avatar

whosyourdaddy

New Zenner

Join Date:
Oct 2009
Posts:
50
Plugin Contributions:
0

Re: AutoFacebook [Support]

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.

Zen Cart Version 1.39h
PHP 5

7 Sep 2010, 11:44 PM
#146
whosyourdaddy avatar

whosyourdaddy

New Zenner

Join Date:
Oct 2009
Posts:
50
Plugin Contributions:
0

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.

Zen Cart Version 1.39h
PHP 5

8 Sep 2010, 1:37 PM
#147
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: AutoFacebook [Support]

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.

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

9 Sep 2010, 3:52 AM
#148
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

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

9 Sep 2010, 12:03 PM
#149
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoFacebook [Support]

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?

9 Sep 2010, 12:34 PM
#150
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoFacebook [Support]

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?

9 Sep 2010, 4:20 PM
#151
joannem avatar

joannem

Zen Follower

Join Date:
Jul 2009
Posts:
110
Plugin Contributions:
0

Re: AutoFacebook [Support]

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

13 Sep 2010, 3:00 PM
#152
whosyourdaddy avatar

whosyourdaddy

New Zenner

Join Date:
Oct 2009
Posts:
50
Plugin Contributions:
0

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

graph.facebook.com/oauth/authorize?type=user_agent&client_id=APPID&redirect_uri=URL&scope=publish_stream,offline_access,manage_pages

If done correctly you get your zen cart with the URL Parameter Access Token

  1. This URL will return to you a URL parameter access_token.
  2. Save the token somewhere;
  3. Load This URL. Replace TOKEN with the token received from Facebook at point 2.

graph.facebook.com/me/accounts?access_token=TOKEN

  1. 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

Zen Cart Version 1.39h
PHP 5

14 Sep 2010, 3:16 AM
#153
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoFacebook [Support]

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

  1. This URL will return to you a URL parameter access_token.

  2. Save the token somewhere;

  3. Load This URL. Replace TOKEN with the token received from Facebook at point 2.

  4. 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):

and fill it in for line 96 where you see:

$page_id = "Your page ID";
14 Sep 2010, 4:13 AM
#154
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

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.

14 Sep 2010, 2:23 PM
#155
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: AutoFacebook [Support]

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..

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

14 Sep 2010, 2:28 PM
#156
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: AutoFacebook [Support]

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:

$prod_description = $_POST['products_description'][$_SESSION['languages_id']];  
> ```php
$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%3EColorful+++entertainment+credenza+puts+a+full+function+media+center+anywhere+you+

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

14 Sep 2010, 2:40 PM
#157
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoFacebook [Support]

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%3EColorful+++entertainment+credenza+puts+a+full+function+media+center+anywhere+you+

hmm... try
deleting:

$prod_description = urlencode($prod_description);  

and adding:

settype($prod_description , "string");

in it's place

14 Sep 2010, 3:01 PM
#158
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: AutoFacebook [Support]

jamielife:

hmm... try
deleting:

$prod_description = urlencode($prod_description);

> ```php
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**

Is your site Upgraded to the current version 1.5.4 Yet?
zencart-upgrades-website-installation

14 Sep 2010, 4:47 PM
#159
whosyourdaddy avatar

whosyourdaddy

New Zenner

Join Date:
Oct 2009
Posts:
50
Plugin Contributions:
0

Re: AutoFacebook [Support]

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):

and fill it in for line 96 where you see:

$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

> 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

> {
>          "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.

Zen Cart Version 1.39h
PHP 5

14 Sep 2010, 11:39 PM
#160
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoFacebook [Support]

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%3EColorful+++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.