Facebook Connect Button

9 years 3 months ago #167313 by jonnysupersonic
Replied by jonnysupersonic on topic Re: Facebook Connect Button
any chance you can post a simple login button full script.
i dont really know javascript
thanks

Please Log in to join the conversation.

9 years 3 months ago - 9 years 3 months ago #167401 by krileon
Replied by krileon on topic Re: Facebook Connect Button

jonnysupersonic wrote: any chance you can post a simple login button full script.
i dont really know javascript
thanks

You don't need to know JS, but just basic HTML. Below is full working example assuming you've CB Login module present on all pages so the API is loaded.
<input type="button" onclick="fbc_login();" value="Sign in" />

The below example is with it fully styled.
<input class="fbc_button" onclick="fbc_login();"  type="button" title="Login with your Facebook account." value="Sign in" />


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

9 years 1 month ago - 9 years 1 month ago #173842 by jonnysupersonic
Replied by jonnysupersonic on topic Re: Facebook Connect Button
I want to display a peice of my joomla cb site in a facebook page. When the user clicks the facebook page tab a page in my site loads.

I have your facebook connect button working on my site with a facebook app.

How do i test if a user is logged in with facebook connect. When the user opens the cb page within facebook i want to either display him the registered part of my website, or show him the facebook connect button. to do this i assume i need to test whether the user is logged in and whether they are logged in with facebook connect?

please tell me how i do this?

*Update*

this is what i found so far.
$fb_user = cbfacebookconnect::getUser( $fb_userid );
if ( $fb_userid )
{ echo $fb_userid; }

How do i include the cbfacebookconnect class into an external page?

anyone available to help?

Please Log in to join the conversation.

9 years 1 month ago #174001 by krileon
Replied by krileon on topic Re: Facebook Connect Button

I want to display a peice of my joomla cb site in a facebook page. When the user clicks the facebook page tab a page in my site loads.

That's not what Facebook Connect does, sorry.

How do i include the cbfacebookconnect class into an external page?

See tutorials within my signature regarding including CB API. Once done you need to include the class file of Facebook Connect and you can then use its API.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

9 years 1 month ago #174030 by jonnysupersonic
Replied by jonnysupersonic on topic Re: Facebook Connect Button
Thank you for your reply. i read all the API documents and your tutorials. I got close. The only error i get now is "Database Error: Unable to connect to the database:Could not connect to MySQL" when i include this file
administrator/components/com_comprofiler/plugin.foundation.php

my code is as follows:

<?php
global $_CB_framework, $mainframe;
define( '_JEXEC', 1 );
define('JPATH_ADMINISTRATOR',"/../../public_html/administrator");
define('JPATH_BASE',"/home/theshuk/public_html");
define( 'DS', DIRECTORY_SEPARATOR );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

if ( defined( 'JPATH_ADMINISTRATOR' ) ) {
if ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB not installed!';
return;
}
include_once( '/home/theshuk/public_html/administrator/components/com_comprofiler/plugin.foundation.php' );
} else {
if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB not installed!';
return;
}
include_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' );
}

cbimport( 'cb.database' );
cbimport( 'cb.html' );
cbimport( 'cb.plugins' );

JDEBUG ? $_PROFILER->mark('afterLoad') : null;
$app = JFactory::getApplication('site');
$app->initialise();

Please Log in to join the conversation.

9 years 1 month ago #174042 by krileon
Replied by krileon on topic Re: Facebook Connect Button
You can't use the API outside of Joomla, it must remain inside of Joomla. Please ensure this is the case. Using API externally is meant for say Joomla modules or other Joomla extensions, but never outside of Joomla it self. At any rate there's not much more I can provide, sorry. Please see the CB API documentation available in the free downloads section.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.430 seconds

Facebook Twitter LinkedIn