Jump to content

Search the Community

Showing results for tags 'facebook'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. This is a theoretical question. So I won't need any code. Here is an example situation: User signs up for website with a username and password. User connects facebook account. Can I make it so everytime they log in, their facebook logs in too? Am I completely getting it wrong? Thanks, Nick
  2. Hey everyone I finally reach a point where I need to go a little further in what social integration is about. That said, and starting with facebook, I've read a few docs and follow the documention but a few questions still remain. I will start to say what I have understood so far: I've created the app in facebook, configured everything just right (I even manage to get a local and production environment going on) I manage to successful login and get the returned url with the token flag From what I understood, I need to get an access_token from this return token, using the php sdk method provided by facebook (something along the lines of $facebook->getAccessToken(); ) The problem: I want to have a like button (with the share dialog). Currently I'm not managing to get the like to appear on the user timeline - I do have permissions, given upon user login. My question: Has anyone implemented something like this? Should I get the access_token and store it in a session variable? How can I associated the access_token to the "like" request? What is usually the basic workflow? What I have: The user click the login button, gets redirected to the facebook page. Logs in, accepts permission and gets back to the mydomain.com/token=facebook_token. I have a script associated specifically to this url (script that upon login, registers/logs the user into my actual website). I think in this script, I can store whatever tokens I need, I'm just trying to figure out where to use them! I've ask around and either this is just so simple no one cares to explain or I'm just having bad luck! Thank you very, very much for your attention. ps.: I'll buy you a beer!
  3. if user has allowed our app but is logged in with another facebook account, then can we still post on his wall for his allowed facebook account?
  4. Hi, my name is Shaan. I joined this forum to learn PHP language as I am clearly new to it. I was wondering if anyone could please tell me in which section do I post general PHP questions, for example Questions like website like Facebook, where do Facebook stores all of the images and pictures thats get uploaded on the website. I have heard that they do not store the uploaded images to the database but someone else. Could anyone please tell me in which section do I post question like this. Sorry this is a first forum I have joined ever which is why I am a bit confused. Regards Shaan
  5. I would like to be able to login to facebook without being there so I can post to facebook from rss files and a database. I can retrieve the access token using curl and I can see the feed. I want to able to post messages using either the api or better still using curl
  6. PHP 5.3.1 latest facebook-php-sdk https://github.com/facebook/facebook-php-sdk Currently I am working on Facebook web application which requires an authentication to extract fb information. The authentication process is of course to be done when users intend to login. But I need to split files so that maintenance of codes would be easier. More specifically, I want to have a single file.php that is responsible for the authentication, and other files read objects or whatever necessary from it in order to apply various functions to the application. the authentication goes like, switch(getenv("SERVER_NAME")) { case "xxx" define('FACEBOOK_APP_ID', ''); define('FACEBOOK_APP_SECRET', ''); define('HTTP_ROOT', 'http://xxx.facebookapp/'); define('DB_HOST', 'localhost'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); define('DB_DATABASE', 'xxx'); break; } $facebook = new Facebook(array( 'appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_APP_SECRET, )); I need this "$facebook" object in many other files. Somehow this part will be in an independent file, and other files refer to the object. Is it possible to do it? Can anyone help me out? soichi
  7. Dear forum members, I am building a system that lets users edit some pieces of my content using their Facebook profiles. I am aware that such a thing requires very custom coding and I am going to make sure that will be done. But I would love to get my hands on some open source software where I can get the following things from: - Version control system such as the one wikipedia uses for backing up versions and making sure admins can redo and undo changes; - Administrator system so some Facebook-profiles may have more editorial rights than others. I want to fully integrate this into my own system. Has anybody got an idea how to do this? I don't want to reinvent the wheel, so to speak. Regards Lucas
  8. I am not sure if this is possible with my current setup but I figure I would give it a shot. I am not familiar at all with the Facebook API but I understand it might be needed for this. Also, my question might pertain to Javascript or HTML more than PHP, but I thought I'd throw it our here in case it does need PHP. I have a PHP script that takes an already existing image, throws text and borders on it from a user input form, and then creates a .png file. The .png file is only stored for a day before being removed, as the images are being attached to emails and sent immediately. The script itself works great! However, there's been a request to allow users to post the image to their Facebook page/wall in addition to attaching the image to an email. I myself have found no easy way to do this, as the image files are not permanently stored on the server. All the research I've done has turned up discussions that end with "this isn't possible" or no solutions. So obviously my question will be "is this possible?" And if it is, how would I achieve it? Thanks! EDIT: I feel it's important to add that I don't want to start storing the images on the server permanently.
  9. I'm building my first ever page tab app for a facebook fan page. It's mostly static HTML with a gallery of user submitted images. The users will be able to vote for the images and the picture with the most votes wins. SImple enough, but I'm struggling here. I'm currently facing 2 problems - the first one is related to authentication inside the app and the other to app flow. 1. authentication In order to know who uploaded the picture, I need to get some unique user info + name. I found out that this is impossible without user authentication, so I'm trying to get the user to authenticate and let me use their ID/name. I created a login link using the getLoginUrl method of the php SDK. This login link works fine when used outside the context of facebook, but doesn't do anything when clicked inside the page tab. How else do I get the desired user data ? 2. app flow I'm trying to split the app into 3 main modules for now - main page, pre-like and upload form. Which one is displayed would be determined by a post variable. My index page looks like this: <?php include( 'head.php' ); if ( $is_liked ) { switch( $_GET['c'] ) { case 'upload' : include( 'pages/upload-form.php' ); break; default : include( 'pages/main.php' ); break; } } else { include( 'pages/pre-like.php' ); } include( 'foot.php' ); ?> The head file initializes the FB Object and creates a variable to say if the user like the page or not. $signed_requrest = $fb->getSignedRequest(); $is_liked = $signed_requrest['page']['liked']; This works fine, but when I'm on some other page (with a URL parameter), then the FB object will not be created correctly, therefore I'm not able to get the 'liked' state of the current user. Does anyone have any idea what's wrong with this ? I hope someone will be able to help me, as the documentation is not too clear about these things...
  10. Hello, guys! I have a really big issue right now, I've been trying to solve this for weeks but I can't find the solution. I have a website (it's kind of a hosting site, for example www.randomhost.com) which has an administrator's section. So if someone creates an account they can post something on their own subpage (user.randomhost.com) via admin's section. The user also has to input their facebook page in the settings (not their personal page but something like a fan-page or a group-page) AND their personal page and of course all the data needed to log into facebook with both accounts (fan-page and personal page). If someone posts something to their own subpage (user.randomhost.com), I want that exact same post to be created on the given fan-page or group-page and seen posted by the user's given personal account. A tried to make it as clear as possible. I can't find the solution, I hope you guys can help. Thanks in advance. VC
  11. Hello, I have a small issue i am using a facebook login script that allows users to log into the website with there facebook user account. I want to extract information regarding the user and feed it directly to my database like there name, sex, address etc from there facebook account. I am attaching the facebook script that i am using to this post. can any help me or give me suggestions on how to do that? facebook_script.php-5Dec-2012.php
  12. I want to create a site that acts a lot like StumbleUpon. I saw a similar thread of basic scripting code on this forum but it didn't really answer the questions that I required to be answered. What I like to do is to create a site similar to StumbleUpon and integrate APIs for a couple different sites. Allow users to find pages on Facebook and Twitter and be able to integrate their FB and Twitter accounts into it. Example, you go to the site, log in to Facebook or Twitter and you're able to browse content from those two sites, then you can like them or retweet them. Does anybody have any recommendations on the best way to approach this?
  13. Hello I have a photobooth app that posts photos with comments to a facebook fanpage. The app posts the photos with no problem but the comments are not being posted. there is a form that you comment on an then when you click upload it submits the form and passes the data to another page. I know that the data is passed correctlt because I have tested it with an "echo" statement and it shows up. for some reason though I cannot take the passed variable and insert it into my comment that will be posted with the photo. I have attached the entire upload code but here is a snippet. If I take out $_POST["lcomment"], and use "a generic comment between single quotes' it works fine and posts the generic comment. but when I try to insert the passed variable as the comment 'message' => $_POST["comment"], I get a null message when it posts to facebook. You can see the app in action here http://eyesocialeyes.com/webcam/ and here is where the photos are being posted on Facebook https://www.facebook.com/pages/Izon/190815390965794 . Please help! #Upload photo here $args = array( 'message' => $_POST["comment"], 'img' => '@' . $original, 'aid' => $album_id, 'access_token' => $fanpage_token ); $photo = $facebook->api($album_id .'/photos','post',$args) ; upload.php
  14. Hello All, I wanted to start a conversation to get some thoughts on social media integration in a website. Pretty much effectively using social media plugins to generate conversation. I feel like throwing social media plugins into your design can lead to poor design. They do get kind of clunky and can be tough to style at times. I know about ShareThis, AddThis and Jtweetsanywhere, but does anyone else know of any other effective solutions, techniques or tools, for social media integration. Thanks,
  15. Alright so at my site (http://independentrepublicofursum.tk/) The facebook social plugin is in the "sidebar" on every page, I don't like how my twitter link loads, then the plugin spawns and pushes it down. I tried to put a div around the plugin with a set height and width so that it would no something is there before the plugin loaded, but no cigar. Help please!
  16. Hi there, I am new to the forum was really unsure where to post my thread since I have no idea where the issue in my application is actually coming from. I've put a flash game on facebook as a canvas app. Once a user authorizes my application I grab their name and id and then use the id to check if they already exist in my database. If they do I pull their score otherwise I add them into the db. Every browser and 3 different machines I have tried it on, and with multiple user accounts, it always works. I have never been able to reproduce the issue of the user not getting registered in the db, but facebook shows that about 28 people have authorized my app, but only 13 of them have been registered in the db. Some friends I asked to try the game told me they liked the game, and facebook says they played it, but they do not show up in my apps database. 13 out of 28 captured! It makes me wanna cry cause all those uncaptured users are not getting the proper experience. I'm using Amfphp framework to bridge flash and php. The app is hosted for free on Heroku and uses the free pgsql db they provide. The app can be seen here: http://apps.facebook...wordfighterbeta After the flash loads I call the AS3 API for facebook: import com.facebook.graph.Facebook; Facebook.init(APP_ID, onInit); //my app id is correctly set function onInit(result:Object, fail:Object):void { if (result) { Facebook.api("/me", getUserInfoHandler, null, "GET"); loggedIn = true; } else { resultTxt.text = "In order to save your highscores this app requires facebook authentication."; loginBtn.label = 'Facebook Login'; loginBtn.addEventListener(MouseEvent.CLICK, handleLoginClick, false, 0, true); loginBtn.enabled = true; } } //called when they click 'login' function handleLoginClick(event:MouseEvent):void { Facebook.login(onLogin); } function onLogin(result:Object, fail:Object):void { if (result) { Facebook.api("/me", getUserInfoHandler, null, "GET"); } else { resultTxt.text = "Authorization denied."; } } function getUserInfoHandler(result:Object, fail:Object):void { if (result) { userName = result.name; userID = result.id; registerUser(userID, userName); //this is where I try to add the user to the database } else { resultTxt.text = 'fail'; } } function registerUser(id, user):void { if (! local) { _netConnection = new NetConnection(); _netConnection.connect("https://sheltered-plateau-6639.herokuapp.com/Amfphp/"); _netConnection.call("WordFighter/registerUser", new Responder(handleResultArray, null), id,user); } } function handleResultArray(result:*):void { for each (var user:Object in result) { userScore = user.score; //start the game } And here is the registerUser function I wrote in PHP: public function registerUser($id, $name){ $host = "ec2-107-22-161-45.compute-1.amazonaws.com"; $user = "jytgyzybpoqjed"; $pass = "password"; $db = "dbvgstj2v06pit"; $con = pg_connect("host=$host dbname=$db user=$user password=$pass") or die ("Could not connect to server\n"); $query = "SELECT * FROM noobs WHERE fbID='$id'"; $rs = pg_query($con, $query) or die("Cannot execute query: $query\n"); if(pg_num_rows($rs) > 0){ $noobs = array(); $noobs[] = pg_fetch_assoc($rs); return $noobs; } else { $query = "INSERT INTO noobs (fbID, name, score) VALUES ('$id', '$name', '0')"; $rs = pg_query($query) or die("Cannot execute query: $query\n"); $query = "SELECT * FROM noobs WHERE fbID='$id'"; $rs = pg_query($query) or die("Cannot execute query: $query\n"); $noobs = array(); $noobs[] = pg_fetch_assoc($rs); return $noobs; } pg_close($con); } So yea. Who is the genius out there that can tell me why so many users aren't getting saved. The part that really confuses me is that when I look at the actionscript I see no way they can advance and play the game without the php returning an answer to the registerUser call since that's the only place in the code that starts the game, so why are some people playing the game and evading the database?
×
×
  • 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.