ogame  Index du Forum ogame
discussion entre membre d equipe


Php Facebook Get Access Token From Code

 
Poster un nouveau sujet   Répondre au sujet    ogame Index du Forum -> Partie publique -> Présentation
Sujet précédent :: Sujet suivant  
joseldenv


Hors ligne

Inscrit le: 08 Mai 2016
Messages: 97
Localisation: Nice

 MessagePosté le: Mer 10 Jan - 20:22 (2018)    Sujet du message: Php Facebook Get Access Token From Code Répondre en citant Back to top




Php Facebook Get Access Token From Code
> DOWNLOAD (Mirror #1)










try { $retobj = $facebook->api('/me/feed', 'POST', array( 'accesstoken' => $facebook->getAccessToken(), 'link' => 'www.example.com', 'message' => 'Posting with the PHP SDK!' )); echo ' Post ID: ' . rev2018.1.10.28327 . '">logout '; } catch(FacebookApiException $e) { // If the user is logged out, you can have a // user ID even though the access token is invalid. Join Stack Overflow to learn, share knowledge, and build your career. $friendres = $facebook->api('/me/friends'); $friendcount = count($friendres[data]); //likes $likes = $facebook->api('/me/likes'); $fblike = $likes[data]; // Getting more user personal data $param = array( 'method' => 'users.getinfo', 'uids' => $uid, 'fields' => 'name,sex,pic,currentlocation,profileurl,email,birthday', 'callback'=> '' ); $userInfo = $facebook->api($param); }catch(FacebookApiException $e){ } } shareimprove this answer answered Mar 14 '14 at 11:49 Pradeep Jadhav 111 add a comment Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow works best with JavaScript enabled .. error and asks for login. SupportPlatform StatusDevelopers GroupMarketing PartnersBugs.. asked 3 years, 10 months ago viewed 35,698 times active 6 months ago Blog Take the 2018 Developer Survey Farewell, Winter Bash 2017! Linked 0 How to get login user's of facebook user acces token and save in mysql Related 2783How can I prevent SQL injection in PHP?1078How do I get PHP errors to display?1849How do I get a YouTube video thumbnail from the YouTube API?1774How do you parse and process HTML/XML in PHP?355Design for Facebook authentication in an iOS app that also accesses a secured web service0Getting Facebook user from access token using php sdk 3.2.01FB Wall Poster - Message Post(Post and notification sended.)/ Link Post ( it posted but notification not sended)1Facebook PHP example returning text instead of executing1493How does Facebook disable the browser's integrated Developer Tools?0Why does verifying a Facebook access token sometimes result in a 400 response? Hot Network Questions Is there a list of old browsers that only support TLS 1.0? How to repeat automatically seamless pattern in Photoshop? How "scrambled" is the data on a RAID5 disk? Research about search vs navigation How can I disable "app is running in the background" notifications? QGIS Shapefile warps when zooming out Can working on a mobile app with bad reviews affect my career? Find the simplest counterexample against exchanging limit and summation Write Moby Dick, approximately Compare two numbers given as strings Is this pirate in the background a young Edward Teague? Fair treatment for employees always late due to public transport How to check if string contain alphabetic characters or alphabetic characters and numbers? oil painting tiny reflections Dashed Tubes in 3D Filter row depending on specific object value and delete those instances SQL correct way of joining if the other parameter is null Is a verbal response that directly expresses anger always the wrong choice? Unable to remove a cross-threaded water hose If someone calls something by a wrong name, what are they actually referring to? System that manages employee data for managers printf, awk . facebook - trying to get app access token - Stack Overflow. Join Stack Overflow to learn, share knowledge, and build your career. It's back! Take the 2018 Developer Survey today . SDKsiOS SDKAndroid SDKJavaScript SDKPHP SDKUnity SDK. SupportPlatform StatusDevelopers GroupMarketing PartnersBugs.. Stack Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile Stack Overflow Business Talent Ads Enterprise Company About Press Work Here Legal Privacy Policy Contact Us Stack Exchange Network Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Software Engineering Unix & Linux Ask Different (Apple) WordPress Development Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica Salesforce ExpressionEngine Answers Stack Overflow em Portugus Blender Network Engineering Cryptography Code Review Magento Software Recommendations Signal Processing Emacs Raspberry Pi Stack Overflow Programming Puzzles & Code Golf Stack Overflow en espaol Ethereum Data Science Arduino Bitcoin more (26) Photography Science Fiction & Fantasy Graphic Design Movies & TV Music: Practice & Theory Worldbuilding Seasoned Advice (cooking) Home Improvement Personal Finance & Money Academia Law more (16) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity English Language Learners Japanese Language Arqade (gaming) Bicycles Role-playing Games Anime & Manga Puzzling Motor Vehicle Maintenance & Repair more (32) MathOverflow Mathematics Cross Validated (stats) Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more (10) Meta Stack Exchange Stack Apps API Data Area 51 Blog Facebook Twitter LinkedIn site design / logo 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. vardump($e); $loginurl = $facebook->getLoginUrl( array( 'scope' => 'publishstream' )); echo 'Please login. more stack exchange communities company blog Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Log In Sign Up . Stack Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile Stack Overflow Business Talent Ads Enterprise Company About Press Work Here Legal Privacy Policy Contact Us Stack Exchange Network Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Software Engineering Unix & Linux Ask Different (Apple) WordPress Development Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica Salesforce ExpressionEngine Answers Stack Overflow em Portugus Blender Network Engineering Cryptography Code Review Magento Software Recommendations Signal Processing Emacs Raspberry Pi Stack Overflow Programming Puzzles & Code Golf Stack Overflow en espaol Ethereum Data Science Arduino Bitcoin more (26) Photography Science Fiction & Fantasy Graphic Design Movies & TV Music: Practice & Theory Worldbuilding Seasoned Advice (cooking) Home Improvement Personal Finance & Money Academia Law more (16) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity English Language Learners Japanese Language Arqade (gaming) Bicycles Role-playing Games Anime & Manga Puzzling Motor Vehicle Maintenance & Repair more (32) MathOverflow Mathematics Cross Validated (stats) Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more (10) Meta Stack Exchange Stack Apps API Data Area 51 Blog Facebook Twitter LinkedIn site design / logo 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. $userprofile = $facebook->api('/me?fields=email,name,id,gender'); } catch (FacebookApiException $e) { echo ' '.htmlspecialchars(printr($e, true)).' '; $user = null; } } shareimprove this answer answered Nov 21 '15 at 9:41 Aryan Rajput 284 add a comment up vote 1 down vote I used facebook graph Api $facebook = new Facebook(array('appId' => $fbconfig['appid'],'secret' => $fbconfig['secret'],'cookie' => true,)); $session = $facebook->getUser(); if($session) { try{ $uid = $session; $fbme = $facebook->api('/me'); $accesstoken = $facebook->getAccessToken(); // FQL : to fetch the email id $fql = "SELECT email FROM user where uid='".$uid."'"; $response = $facebook->api(array('method' => 'fql.query','query' =>$fql,)); $useremail = $response[0][email]; // Friend COunt. After I click login, the post is sucesfully posted. It was during a lab. asked 5 years, 2 months ago viewed 80,973 times active 2 months ago Blog Take the 2018 Developer Survey Farewell, Winter Bash 2017! Linked 8 Getting App Access Token for facebook app? 4 Node.js - Get my account details from facebook graph api 4 Facebook Graph API access with client token/anonymous? 3 Displaying Facebook posts to non-Facebook users 1 How to get facebook likes count only for a facebook page? 2 Facebook RSS - Large Images 1 Make anonymous call with Facebook PHP SDK 0 Do review required if we want to get Facebook Page like count (Without Facebook login) by Facebook app token? 0 Generic Facebook User Access Token for public event search 0 Facebook Graph API: retrieve basic profile information without accesstoken? see more linked questions Related 71How to get the Facebook user id using the access token355Design for Facebook authentication in an iOS app that also accesses a secured web service9Facebook access Token with longer expiration1Getting an access token for my facebook app7FB exchange token api missing redirecturi3redirecturi error in oauth for facebook django app2Access token redirect not working1Posting to a user's Facebook wall using Facebook Application Access Token fails2can't use facebook graphapi debugtoken to debug users accesstoken0How to get facebook post(keyword search) using API Hot Network Questions Why is it allowed to have a declaration without a name? On measurable cardinals Adding many items to a list System that manages employee data for managers Do I need to coat beef in flour mixture for slow cooked stew? Why is 11 am + 1 hour == 12:00 pm? Is this a real photo of Australia? Are there any Boeing B747 still flying for commercial use? What kind of approval does Donald Trump need to build his wall? Which popular games have been studied mathematically? What limits the speed of a car? How do I negotiate more "Man" time for myself without offending my partner? The length of coil winding on cylinder. $facebook = new Facebook(array( 'appId' => 'AppIDHere', 'secret' => 'AppSecretHere', )); // See if there is a user from a cookie $user = $facebook->getUser(); if ($user) { try { // Proceed knowing you have a logged in user who's authenticated. The user variables can be got from Facebook Graph API shareimprove this answer answered Mar 14 '14 at 10:51 mutiemule 373624 anyway to get user info without appid and appsecret (i have already generated access token using an app) –Samnad Sainulabdeen Mar 14 '14 at 11:40 add a comment up vote 2 down vote If You want to get useremail and other info then you can use this code. Email Sign Up or sign in with Google Facebook How to get user profile info using access token in php-sdk Ask Question up vote 0 down vote favorite 5 I want to get user profile using access token that i have already generated, and if the access token is invalid it shoud display error. // If not, we'll get an exception, which we handle below. The user already granted the permissions to the app to post on his wall. Bakker Jan 29 '14 at 10:18 Sorry I cant remember. –CBroe Mar 14 '14 at 11:22 add a comment 4 Answers 4 active oldest votes up vote 15 down vote accepted Since you already have the access token, the simplest and clean way would be- $userdetails = " .$accesstoken; $response = filegetcontents($userdetails); $response = jsondecode($response); printr($response); shareimprove this answer answered Mar 14 '14 at 10:57 Sahil Mittal 19k125080 its working ! but how to handle with invalid token ? –Samnad Sainulabdeen Mar 14 '14 at 11:13 2 SamnadSainulabdeen: How about you start doing some research on your own before asking? google.com/search?q=facebook+app+handle+invalid+token -> developers.facebook.com/blog/post/2011/05/13/… –CBroe Mar 14 '14 at 11:23 in the response string you'll get the error key if there's an error! And pls accept the ans if that helped! –Sahil Mittal Mar 14 '14 at 11:33 SahilMittal thanks i have changed the code little bit, now working. Please go read How to Ask. ToolsGraph API ExplorerOpen Graph DebuggerObject BrowserJavaScript Test ConsoleAPI Upgrade ToolFacebook Analytics. Too long ago. Email Sign Up or sign in with Google Facebook Facebook PHP SDK - How to get access token? Ask Question up vote 4 down vote favorite 3 I'm trying to post on user's Facebook wall from my app. php facebook facebook-graph-api facebook-php-sdk facebook-access-token shareimprove this question edited Mar 14 '14 at 10:59 Sahil Mittal 19k125080 asked Mar 14 '14 at 10:25 Samnad Sainulabdeen 831211 ? i am seaching for help :/ –Samnad Sainulabdeen Mar 14 '14 at 11:19 1 No, you are blatantly asking for someone to throw working code in your direction. anyone can help to do this ? i want php code to handle this. i am waiting 5a02188284
download de facebook para celular javahow to resize facebook like buttondownload someone 39;s facebook wallwhat does it mean on mobile on facebook messengerbyta spr k i facebook appfacebook football for lifefacebook password sniffer onlinefree download facebook chat for samsung champ c3303iwordpress facebook like box disappearshttp apps.facebook.com ondapix descargar gratis


 
Publicité






 MessagePosté le: Mer 10 Jan - 20:22 (2018)    Sujet du message: Publicité Back to top

PublicitéSupprimer les publicités ?
 
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    ogame Index du Forum -> Présentation Toutes les heures sont au format GMT + 1 Heure
Page 1 sur 1

 
Sauter vers:  

Index | Panneau d’administration | Creer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation

Cobalt 2.0 phpBB theme/template by Jakob Persson.
Copyright © 2002-2004 Jakob Persson


Powered by phpBB © 2001, 2018 phpBB Group
Traduction par : phpBB-fr.com