Manual share on Timeline

Manual share on Timeline

Hi,

Is it possible to configure a button to share on timeline? I've configured the "Like Button" and the "Send to Friends Button" however, did not find anything related to share on timeline, except for the automatic posts (using actions).

Could you please let me know how to display a button "Share on timeline"?

Regards,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

There's a few different ways to do that. If it's a specific 'action' you want to implement for certain pages of your site, like "John enjoyed xyz" or "Rafael cooked a recipe", that would be implemented with Open Graph Actions. Those are a little more complex to implement, but very specific and don't require any popups for the user.. they just click a button and it posts the 'action' to their Timeline.

Alternatively, you can create a simple button that will popup a feed post box for the user to add a comment and post the share to their timeline. To do so, you'd just want to add the following code to your page, template, or a custom module:

Code:

<a href="javascript:void(0);" onclick="jfbc.social.feedPost("Title of the page","A caption for this post","A pre-filled description for the page that the user will be able to edit",window.location,'http://yoursite.com/link-to-an-image.jpg')><img src="http://yoursite.com/post-to-wall-button.jpg" /></a>

Hopefully, those fields above make sense, but if you have questions, just let me know.

Best of luck,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Thanks for your quick reply, Alex

So, using Open Graph Actions... the user in my website can generate coupons (discounts) to be used in partners (restaurants, etc).

There is a button "Generate Coupon" which invokes generate_coupon.php... which will handle all the coupon generation.

I've created in FB Open Graph, an object (COUPON) and an action (GENERATE)...

Could you please explain me how to configure the button click event to automatically post in timeline something like: "Rafael has generated a coupon in website XYZ". ?

Another (stupid :-)))) question: I have no plugins enable for Open Graph in my Joomla... (please check the picture below)... from where I need to download, and exactly which one should I install?

http://screencast.com/t/rtJXE1eA

Kind Regards,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Hi alzander,

Any news? Thanks again for your support.

Kind Regards,
Rafael Diel

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Rafael,
Sorry for the delay. Your question is a bit more complex in JFBConnect than we'd like it to be.. something we're working on improving in an upcoming release.

For now, you'd want to install the Open Graph - Custom plugin, which is in the main JFBConnect zip file you download from this site in the 'opengraph' directory of that package.

Then, create an 'object' in the Open Graph area of type "Custom". Set the type as "coupon" (or whatever you want it to be. In the righthand side for query parameters, set the values for your custom component, like:
option=com_coupons
view=coupon

With that, on each coupon page, JFBConnect will set the og:type tag of 'coupon'.

Next, create a custom 'action'. The action type would be "generate". Set the action type to "Manual" and make sure it's associated with the 'coupon' object you created. Save and note the ID number of the action (likely '1'). Then, on your page that generates the coupon, add a button like:

Code:

<a href="#" onclick="jfbc.opengraph.triggerAction('1','http://site.com/link-to-coupon-page')"><img src="http://site.com/button-image.jpg" /></a>

Update the '1' there to the actual action id.

When clicked, that should trigger the action on the page and show the blue box popup that an action has posted to the timeline.

I hope that helps, but obviously test and let us know how it goes.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Thanks again for your help...

However, the action should be triggered while clicking in a button, which is available in a Jumi module (with PHP code).

For this reason, there is no com_<coupon> or something like this.

I should use com_jumi ? And what I should write in the view parameter?

Kind Regards,
Rafael Diel

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Code:


echo 'Você ainda pode gerar 4 cupons deste estabelecimento no mês corrente. Pressione o botão "Gerar Cupom" caso deseje usufruiu do seu benefício nos próximos dois dias. Lembre-se de que, após gerado, o seu cupom tem validade de 48 horas.Gerar CupomGerar CupomGerar CupomGerar Cupom';

This is the code which is available in the page to generate coupons (with 4 buttons)... I did change only the first button, as you can see above. Can you check if it is correct?

Regards,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

acexgames wrote:

Code:


echo 'Você ainda pode gerar 4 cupons deste estabelecimento no mês corrente. Pressione o botão "Gerar Cupom" caso deseje usufruiu do seu benefício nos próximos dois dias. Lembre-se de que, após gerado, o seu cupom tem validade de 48 horas.Gerar CupomGerar CupomGerar CupomGerar Cupom';

This is the code which is available in the page to generate coupons (with 4 buttons)... I did change only the first button, as you can see above. Can you check if it is correct?

Regards,
Rafael

The code is not correct in the previous post... trying again:

Code:

echo '<center><table><tbody><tr><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><h5><center><p class="info">Você ainda pode gerar 4 cupons deste estabelecimento no mês corrente. Pressione o botão "Gerar Cupom" caso deseje usufruiu do seu benefício nos próximos dois dias.</p> <p class="error">Lembre-se de que, após gerado, o seu cupom tem validade de 48 horas.</p></center></h5></td></tr><tr><td width="20%"><center><a class="btn btn-info" href="#" onclick="jfbc.opengraph.triggerAction("1","gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'")">Gerar Cupom</a></center></td><td width="20%"><center><a class="btn btn-info" href="gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'">Gerar Cupom</a></center></td><td width="20%"><center><a class="btn btn-info" href="gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'">Gerar Cupom</a></center></td><td width="20%"><center><a class="btn btn-info" href="gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'">Gerar Cupom</a></center></td><td width="20%"></td></tr></tbody></table></center>';

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Rafael,
A few questions:

However, the action should be triggered while clicking in a button, which is available in a Jumi module (with PHP code).

The code above should work for that with a little modification. Basically, you'll update the onclick call to call our code and *then* redirect to the page you want. However, that page you're redirecting to will have to be a Joomla page of some sort. JFBConnect only knows about "Joomla", so if you're generating that page outside of Joomla, there will likely be issues as we won't be able to assign the object stuff to the coupon page. Our logic also checks to make sure that the action you're trying to trigger is properly associated with the object, which would fail (and stop the posting) if your page isn't in Joomla.

Can you explain more about how your extension/coupon creation is working?

As for the code you posted:

Code:

onclick="jfbc.opengraph.triggerAction("1","gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'")

You need to use a full URL, like: http://yoursite.com/gerar_cupom.php?dat … p;estab=1. The parameters should be fine, just hard-code the http://... portion in there.

Let me know more about the creation process and we'll see what we can do.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Hi Alex

The issue is related to the "#" in the href clause... when I click in the button, the page is refreshed...

Let me explain to you about the modules, and the gerar_cupom.php

The page has some joomla modules (custom_html)... the bottom module is a JUMI module, which uses a "cupom.php" file...

The buttons to generate the coupons are located in this cupom.php, with the code below:

Code:

 

echo '<td width="20%"><center><a class="btn btn-info" href="#" onclick="jfbc.opengraph.triggerAction("1","http://www.mydomain.com.br/gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'")">Gerar Cupom</a></center></td>';

It means, when I click in the button "Gerar Cupom", it should invoke the "gerar_cupom.php" (which is not a Joomla com) and, in the end, redirects the user to the previous page.

Let me know if it's clear.

Regards,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

If the # is causing an issue, change the code to be: href="javascript:void(0);" onclick="....

For the gerar_cupom.php file, does that generate a unique page (unique URL) for each coupon, or is it loaded in a module position? For Facebook actions, each action has to be on a unique URL (an object). JFBConnect will set that type for each page, but if all the coupons have the same URL (since it's loading in a module on that page), that would be a problem.

Let me know more, or, if it's possible to let me see a URL where the coupon is generated that may help me understand more.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Hi Alex

In fact, the gerar_cupom.php is something that runs in "background"... when we click in the button "Gerar cupom", it calls this PHP gerar_cupom.php which generates a new record in the coupons table, and redirects the user to "My Coupons" page...

got the point ?

Cheers
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

In the "My Coupons" table, is there a unique URL for each coupon? Again, each 'object' (page/url) of your site that the user can perform an 'action' (generate a coupon) must have a unique URL. So, at the time that the coupon is generated, will you be able to determine the URL of the 'coupon' page? Is that URL a Joomla URL?

Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Hi Alex

Each coupon has a specific CODE, which is a column in the coupons table.

In order to view a generated coupon, you should access a path, like: http://<mydomain>/visualizar_cupom.php?id=1234567890

The visualizar_cupom is not a Joomla page.

Regards,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Gotcha. So.. one last question. I know I have a lot of questions, but the problem is that the object/url (coupon) has to be unique for each action (generate). Since you aren't using a Joomla URL for the coupon, do you have a page for the product itself that may work? So, if a user is generating a coupon for Tide Detergent, instead of using the object of the 'coupon' itself, do you have a page for 'Tide Detergent'? I think that would work better in general because you could create an action that posts something like "John generated a coupon for Tide" and then the link (in Facebook) would be to the product itself.

If you set the object to the coupon URL itself, is that something that's accessible to anyone (not logged in) *and* is that something you would want to let users/guests from Facebook to go straight to?

I think what you really want is to set the object to a product page of some sort and create a 'generate' action on those product pages. That will get Facebook users to go to the product page and give them a good incentive to join and generate their own coupon.

Hope that all helps and make sense, but as always, let us know if you have any questions.

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Hi Alex,

You got the point. That is EXACTLY what I want.

For example: there's a joomla page (http://<domain>/index.php/estabelecimentos/alimentacao/restaurantes/restaurantes-title/restaurante-1) for a specific restaurant (and this page is available to any user, logged in or not.

On this page, in the bottom module it's available the "Generate Coupon" button (which is available only to registered users)... I would like, every time a user clicks in that button, post on timeline "Alex generated a coupon in website_name", and this should redirect the users to the restaurant page.

Can you guide me on how to do this? current/smile

Thanks again,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Rafael,
Awesome! Glad we got to the bottom of this. With that, it sounds you *do* have an Joomla URL for an Object (the product page). I'm assuming that restaurant page is a Joomla article. Let's hope so, because then this stuff should be pretty straightforward to setup:
* Install and enable the Open Graph - Content plugin
* Create a new "Article" object. Set the type to "Restauant" or whatever you want the 'product' type to be.
* Create/update the action for 'generate' and associate it to the article object created in the previous step.

Then, update your Javascript trigger to use the URL of the product page, like:

Code:

jfbc.opengraph.triggerAction("1", "http://<domain>/index.php/estabelecimentos/alimentacao/restaurantes/restaurantes-title/restaurante-1");

So, when triggered, an activity log entry will be made that the user generated a coupon for the restaurant and the link in Facebook will go to that restaurant page... the coupon itself will be shown to the user that clicked the button though and not made public to everyone.

Hope that helps get you going, but definitely keep us posted!
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

Sorry Alex, but, it's still not working current/smile

In fact, the restaurant page is not an Article.

It's a menu item with type "Jumi Application" which always call the Jumi Application Id 3...

Let me describe what I've configured (which is not working) current/smile

1) Object created
Extension -> custom
Layout -> custom
Name -> cupom
Object Type -> powpayrj:cupom  (as in the Get Code of FB Open Graph)
Built-in Facebook Object -> Y
URL Query Parameters:
option=com_jumi
fileid=3

2) Article Created
Title -> Gerar Cupom
Action -> powpayrj:gerar (as in the Get Code of FB Open Graph)
Built-in Facebook Action -> Y
Action Type -> Manual

Both are published...

In the "Gerar Cupom" link, I've defined:

Code:

<a class="btn btn-info" href="#" onclick="jfbc.opengraph.triggerAction(1,http://www.acexgames.com.br/powpay_tmp/gerar_cupom.php?data=2013-04-07&user=376&estab=223)">Gerar Cupom</a>

I also have tried with void(0) but, nothing happens...

Kind Regards,
Rafael

acexgames
useravatar
Offline
21 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Manual share on Timeline

For your configuration, both the action and object are *not* built-in FB Actions. Those are custom actions you've created in Facebook, so you should uncheck that box. Also, remove your namespace from the 'type', so it's just 'cupom' and 'gerar'. Facebook will automatically add the namespace where required.

As for your Javascript call, you don't have a single quote mark around the URL, which would definitely cause a Javascript error. It should look like:

Code:

onclick="jfbc.opengraph.triggerAction(1,'http://www.acexgames.com.br/powpay_tmp/gerar_cupom.php?data=2013-04-07&user=376&estab=223');"

And finally, that URL you have is again to your gerar_cupom.php page, which is not from Joomla. That should be going to the action product page that you want to post on Facebook (and that your object is configured for), like:

Code:

onclick="jfbc.opengraph.triggerAction('1', 'http://<domain>/index.php/estabelecimentos/alimentacao/restaurantes/restaurantes-title/restaurante-1');"

Hope that gets you going,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24020 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11614
Total Polls:
0
Total Posts:
48805
Posts today:
6
User Info
 
Total Users:
47662
Newest User:
ghelgholi
Members Online:
3
Guests Online:
1114

Social Stream
SourceCoast Joomla Social Extensions
Friday, 25 May 2018
JFBConnect 8.0 Coming Soon! Stay tuned.
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program