h1k3's Recent Forum Activity

  • Did you request the streaming permission? There is a lot to it because its so versatile. Ill see if I can start putting something under tutorials tonight. But it might take a few days before its complete.

  • Did you request the streaming permission?

  • ersion 0.30 is here. This version adds the ability to fetch the users birthday and email address.

    Current Version: 0.30

    Version o.30

    Example Capx

    Capx

    Example in action

    Sample Here

    Version 0.21 (old for breaking changes purposes) If you are updating from version o.21, make sure to remove any story posting references first. Or you will need to revert back to this version to do so before updating.

    Facebook Complete

    <font color="red"><font size="6">CURRENT FEATURES</font></font>

    <font size="5">ACTIONS:</font>

    Update Status - Update the user login status

    Login Dialog - Log User Into your app

    Update Basic User Info - Fetch available basic user data

    Facebook Logout - Log User out of Facebook

    Delete App - Delete your application for the user

    Post Story - Post Story to Users Feed

    Publish score - Publish a score for this user

    Request user top score - Request user top score

    Prompt To Share Story - Prompt to Share Story to Users Feed

    Invoke Pay Dialog - Prompt User to Purchase an Item with Facebook Credits.

    Fetch Game Friend List - Fetch a list of all users friends that play this app.

    Fetch game friend info by array ranking number - Fetch game friend info by array ranking number.

    Login Popup - Log into your app using javascript(non redirect)

    <font color="green">Upload Photo by URL</font> - Upload a photo to the users profile.

    <font size="5">CONDITIONS:</font>

    On App User Logged In - triggers when user status changes to installed

    On App Not Installed - triggers when user status changes to not installed

    On Facebook Logged Out - triggers when user status changes to a user who has not logged into Facebook

    On Facebook Info Populated - Triggered When user Facebook Information Expressions are populated

    Is user logged in - True if currently being viewed inside Facebook by a logged in user

    On Story Success - Triggered when the last story action completes successfully.

    On Story Failed - Triggered when the last story action completes unsuccessfully

    On Payment Success - Triggered When user successfully completes a credits transaction.

    On Payment Failure - Triggered When user unsuccessfully completes a credits transaction.

    On Game Friends Loaded - Triggered once all game friends have been loaded.

    <font color="green">On Photo Upload Fail</font> - Triggered once a photo failed to upload.

    <font color="green">On Photo Upload Success</font> - Triggered once a photo has been uploaded.

    <font size="5">EXPRESSIONS:</font>

    UserID - Return the UserID of the Facebook player.

    UserAccessTokenExpiresIn - Return the seconds left until the Access token expires.

    UserLoginStatus - Return the login status of the Facebook player

    UserAccessToken - Return the current User Access Token

    UserSignedRequest - Return the current Signed Request

    UserFullName - Return the users full name

    UserFirstName - Return the users first name

    UserLastName - Return the users last name

    ThirdPartyID - Return the users Third Party ID

    UserGender - Return the users gender

    UserLocale - Return the users locale

    UserLink - Return the users Facebook link

    UserUserName - Return the users Facebook Username

    StoryFeedPostID - Return the PostID for the last story feed posting or error if an error occured

    UserPicture - Return the users true Facebook Picture Url

    ScoreError - Return the status of the last Score Posting

    Score - Get the score, when in a 'on user top score' or 'on hi-score' event

    Payment Order Status - A Facebook order status IE.. 'settled'.

    Payment Order ID - A Facebook order id.

    Payment Error Code - An error code identifying the error.

    Payment Error Message - An error message describing the error.

    Current friend score - Current selected game friends score.

    Current friend name - Current selected game friends name.

    Current friend ID - Current selected game friends ID.

    Current friend rank - Current selected game friends rank.

    Game Friend Array length - Current selected game friends array length.

    Minimum Age Range - The user's minimum age range.

    Maximum Age Range - The user's maximum age range.

    Email - Users Email Address

    Birthday - Users Birthday mm/dd/yyyy format

  • I see you looked at my site and created an account. Nice little login function but you wouldn't need that with a Facebook app. It's still very new even though it's been a site for a while. As you can see from my picture, I'm a father of 6 so my free-time is limited. LOL Its also a switch I had been working on an app at apps.facebook.com/relicsofyore but that's taken a back seat to this app for now. I think it's still active but you can't do much beyond walk around the town I had built.

  • I'm on Facebook at:

    Find me here :)

    Feel free to add me there, unless you were talking to whiteclaws, in that case forget it. :P j/p

  • lol nothing unless you actually need help setting it up. :) I just did some work last week for a guy RussB who wanted to be able to take and upload a snapshot to Facebook. Hey returned the favor by drawing me some graphics. But another tip for you to increase the frequency of replies. Put a before someones name in the message like It will send that person an alert.

  • Not sure if you specifically need the default plugin but I have a plugin with some more advanced features here:

    Facebook Advanced

    There is a template capx included with the plugin.(Well a link is available on the topic page)

  • Maybe your query statement is wrong? Here is a copy of one of the functions in the library I'm using.

    public function getUserNotes($suids, $CID, $page, $limit){

        //$result = $this->mysqli->prepare("SELECT * FROM `Contacts` WHERE `uid` = $suids ORDER BY `Next_Contact` ASC ");

        $result = $this->mysqli->query("SELECT * FROM `Notes` WHERE `UID` = $suids AND `Contact_ID` = $CID ORDER BY `Date` DESC LIMIT $page , $limit");

        $rows = array();

        while($row = $result->fetch_assoc()){

                 $rows[] = $row;

        }

        return $rows;

    }

    Notice I'm not using any ' or seperating variable from the string with " and . marks. Although for good measure I am using backticks ` to wrap around the table and reference points. Here is a copy of my login function as well. Maybe you can pull some ideas from it.

    public function login($username, $password)

         {

              $return = array();

              

              if($this->isBlocked($_SERVER['REMOTE_ADDR']))

              {

                   $return['code'] = 0;

                   return $return;

              }

              else

              {

                   if(strlen($username) == 0) { $return['code'] = 1; $this->addAttempt($_SERVER['REMOTE_ADDR']); return $return; }

                   elseif(strlen($username) > 30) { $return['code'] = 1; $this->addAttempt($_SERVER['REMOTE_ADDR']); return $return; }

                   elseif(strlen($username) < 3) { $return['code'] = 1; $this->addAttempt($_SERVER['REMOTE_ADDR']); return $return; }

                   elseif(strlen($password) == 0) { $return['code'] = 1; $this->addAttempt($_SERVER['REMOTE_ADDR']); return $return; }

                   elseif(strlen($password) != 40) { $return['code'] = 1; $this->addAttempt($_SERVER['REMOTE_ADDR']); return $return; }

                   else

                   {

                        $plainpass = $password;

                        $password = $this->getHash($password);

                        

                        if($userdata = $this->getUserData($username))

                        {

                             if($password === $userdata['password'])

                             {

                                  if($userdata['isactive'] == 1)

                                  {

                                       $sessiondata = $this->addNewSession($userdata['uid']);

                                       $return['code'] = 4;

                                       $return['session_hash'] = $sessiondata['hash'];

                                       

                                       $this->addNewLog($userdata['uid'], "LOGIN_SUCCESS", "User logged in. Session hash : " . $sessiondata['hash']);

                                       

                                       return $return;

                                  }

                                  else

                                  {

                                       $this->addAttempt($_SERVER['REMOTE_ADDR']);

                                  

                                       $this->addNewLog($userdata['uid'], "LOGIN_FAIL_NONACTIVE", "Account inactive");

                                  

                                       $return['code'] = 3;

                                       

                                       return $return;

                                  }

                             }

                             else

                             {

                                  $this->addAttempt($_SERVER['REMOTE_ADDR']);

                             

                                  $this->addNewLog($userdata['uid'], "LOGIN_FAIL_PASSWORD", "Password incorrect : {$plainpass}");

                             

                                  $return['code'] = 2;

                                  

                                  return $return;

                             }

                        }

                        else

                        {

                             $this->addAttempt($_SERVER['REMOTE_ADDR']);

                        

                             $this->addNewLog("", "LOGIN_FAIL_USERNAME", "Attempted login with the username : {$username} -> Username doesn't exist in DB");

                        

                             $return['code'] = 2;

                             

                             return $return;

                        }

                   }

              }

         }

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Really silly question, but this line here

    $con=mysqli_connect("localhost","dbuser","dbpass","database");

    Those are not your actual values correct?

  • try without adding those ' characters to the ajax string. I have a rather complex login using ajax and get. What kept messing me up was exactly that.

  • Also for anything more then a like button you will need to use the standard Facebook plugin or one of the third party plugins under the Plugins section of the forum.

  • Make sure at the least, you set the website domain(www.mydomain.com) in app settings as well as the physical link to the uploaded program(www.mydomain.com/myapp) Note: If I recall correctly you need to add a "?" to the secure link(www.mydomain.com/myapp/?

    Once the above has been done you will be able to access the program yourself as the author(or anyone you setup in the app settings) until you turn off sandbox mode(again in app settings) Sandbox mode prevents anyone not a developer of your app from viewing your app(but this isn't your current issue. Just mentioned for the sake of thoroughness)

h1k3's avatar

h1k3

Member since 1 Apr, 2012

Twitter
h1k3 has 3 followers

Connect with h1k3

Trophy Case

  • 12-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies