Jump to content

Facebook and cubepoints


VonBP

Recommended Posts

Hi there!

 

First, i must say that i have no php knowledge, maybe a 1%

 

Here is what i want to do:

 

I have wordpress, with a plugin called Facebook connect, it has a cool feature where you can invite your facebook friends, it looks like this:

 

http://dailyerz.com/login/?fbconnect_action=invite

 

And i am also using cubepoints, a plugin that rewards users with points. I want to reward users for every user they invite.

 

From the cube points docs http://techcube.net/docs/1.3/docs.html

i got this:

 

The following code will add 10 points to the current logged in user. If no user is logged in, no points will be added. You may input negative number to subtract points.

 

<php
  if( function_exists('cp_alterPoints') && is_user_logged_in() ){
    cp_alterPoints(cp_currentUser(), 10);
  }
?>

 

and the invite.php of facebook connect looks like this:

 

<?php get_header(); 
$fb_user = fb_get_loggedin_user();
?>
<div style="padding:20px;" >
<?php if(FBCONNECT_CANVAS=="web") : ?>	
  <fb:serverfbml style="width: 100%;">
    <script type="text/fbml">
      <fb:fbml>
<?php endif; ?>		      	
      	
          <fb:request-form
                    action="<?php echo get_option('siteurl'); ?>"
                    method="GET"
                    invite="true"
                    type="<?php echo get_option('blogname');?>"
                    content="<?php echo get_option('blogname')." : ".get_option('blogdescription'); ?>
                 <fb:req-choice url='<?php echo get_option('siteurl'); ?>'
                       label='<?php _e('Become a Member!', 'fbconnect') ?>' />
              "
              >

                    <fb:multi-friend-selector
					rows="5"
					email_invite="false"
					cols="3"
                    showborder="false"
                    actiontext="<?php _e('Invite your friends to Dailyerz.', 'fbconnect') ?>">
        </fb:request-form>
<?php if(FBCONNECT_CANVAS=="web") : ?>
      </fb:fbml>

    </script>
  </fb:serverfbml>
<?php endif; ?>	
</div>
<?php get_footer(); ?>

 

 

Any idea on how to make this work? Do i have to create a Facebook App?  :wtf:

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/215828-facebook-and-cubepoints/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.