Phonegap Facebook Plugin Post To Wall

 
Poster un nouveau sujet   Répondre au sujet    MASTER & COMMANDER - De la Mer à l'Histoire Index du Forum -> Pour les utilisateurs du forum MASTER & COMMANDER -> Présentations
Sujet précédent :: Sujet suivant  
Auteur Message
savylhazal
Capitaine de corvette

Hors ligne

Inscrit le: 22 Mar 2016
Messages: 132
Localisation: Toulouse

MessagePosté le: 10/01/2018 23:01:38    Sujet du message: Phonegap Facebook Plugin Post To Wall Répondre en citant




Phonegap Facebook Plugin Post To Wall
> DOWNLOAD (Mirror #1)










facebookConnectPlugin.showDialog({method:"feed",picture:'. facebookConnectPlugin.api(String requestPath, Array permissions, Function success, Function failure). Login. ", result); }); }); }; Getting a User's Birthday Using the graph api this is a very simple task: facebookConnectPlugin.api(" /?fields=id,email", ["userbirthday"], function onSuccess (result) { console.log("Result: ", result); /* logs: { "id": "000000123456789", "email": "myemailexample.com" } */ }, function onError (error) { console.error("Failed: ", error); } ); Publish a Photo Send a photo to a user's feed facebookConnectPlugin.showDialog({ method: "share", picture:' name:'Test Post', message:'First photo post', caption: 'Testing using phonegap plugin', description: 'Posting photo using phonegap facebook plugin' }, function (response) { console.log(response) }, function (response) { console.log(response) } );. Using the graph api this is a very simple task:. Permalink Failed to load latest commit information. Get Status. You can always search for the page below. facebookConnectPlugin.login(Array strings of permissions, Function success, Function failure). Note: "In order to make calls to the Graph API on behalf of a user, the user has to be logged into your app using Facebook login.". Failure function returns an error String. Logout facebookConnectPlugin.logout(Function success, Function failure) Get Status facebookConnectPlugin.getLoginStatus(Function success, Function failure) Success function returns an Object like: { authResponse: { userID: "12345678912345", accessToken: "kgkh3g42kh4g23kh4g2kh34g2kg4k2h4gkh3g4k2h4gk23h4gk2h34gk234gk2h34AndSoOn", sessionKey: true, expiresIn: "5183738", sig: "." }, status: "connected" } For more information see: Facebook Documentation Show a Dialog facebookConnectPlugin.showDialog(Object options, Function success, Function failure) Example options - Feed Dialog: { method: "feed", link: " caption: "Such caption, very feed." } App request: { method: "apprequests", message: "Come on man, check out my application." } For options information see: Facebook feed dialog documentation, Facebook share dialog documentation Success function returns an Object with postId as String or from and to information when doing apprequest. However, unlike in the browser, the Cordova application will use the native Facebook app to perform Single Sign On for the user. Login. Logout facebookConnectPlugin.logout(Function success, Function failure) Check permissions (iOS only) facebookConnectPlugin.checkHasCorrectPermissions(Array strings of permissions, Function success, Function failure) Success function returns a success string if all passed permissions are granted. Events. NOTE: Both parameters are required. The Graph API facebookConnectPlugin.api(String requestPath, Array permissions, Function success, Function failure) Allows access to the Facebook Graph API. When reported, all of the valueToSum properties will be summed together. Example options: { url: " picture: " } Sample Code facebookConnectPlugin.appInvite( { url: " picture: " }, function(obj){ if(obj) { if(obj.completionGesture == "cancel") { // user canceled, bad guy } else { // user really invited someone Smile } } else { // user just pressed done, bad guy } }, function(obj){ // error console.log(obj); } ); Login In your onDeviceReady event add the following var fbLoginSuccess = function (userData) { console.log("UserInfo: ", userData); } facebookConnectPlugin.login(["publicprofile"], fbLoginSuccess, function loginError (error) { console.error(error) } ); Get Access Token If you need the Facebook access token (for example, for validating the login on server side), do: var fbLoginSuccess = function (userData) { console.log("UserInfo: ", userData); facebookConnectPlugin.getAccessToken(function(token) { console.log("Token: " + token); }); } facebookConnectPlugin.login(["publicprofile"], fbLoginSuccess, function (error) { console.error(error) } ); Get Status and Post-to-wall For a more instructive example change the above fbLoginSuccess to; var fbLoginSuccess = function (userData) { console.log("UserInfo: ", userData); facebookConnectPlugin.getLoginStatus(function onLoginStatus (status) { console.log("current status: ", status); facebookConnectPlugin.showDialog({ method: "share" }, function onShareSuccess (result) { console.log("Posted. " + JSON.stringify(result)); }, function (e) { alert("Failed: " + e); }); } ); }; . facebookConnectPlugin.getLoginStatus(Function success, Function failure). Supported on PhoneGap (Cordova) v3.5.0 and above. Aug 3, 2016 CONTRIBUTING.md Fix link from contributing to troubleshooting Feb 6, 2017 LICENSE 0.3.2 Jul 10, 2013 README.md Added hashtag support (#418) Feb 9, 2017 package.json 1.9.1 Jun 4, 2017 plugin.xml Update plugin.xml to 1.9.1 Jun 4, 2017 . Failure function returns an error String. Failure function returns an error String. [iOS] [Android] [JS] Does not have an Events API, so the plugin functions are empty and will return an automatic success Activation events are automatically tracked for you in the plugin. Page not found. They also include versions of the Android and iOS Facebook SDKs. Nothing found for %E2%80%A6ting To A Facebook Wall With. var fbLoginSuccess = function (userData) { alert("UserInfo: " + JSON.stringify(userData)); facebookConnectPlugin.getAccessToken(function(token) { alert("Token: " + token); }, function(err) { alert("Could not get access token: " + err); }); } facebookConnectPlugin.login(["publicprofile"], fbLoginSuccess, function (error) { alert("" + error) } ); . Example Apps. Compatibility Cordova >= 5.0.0 cordova-android >= 4.0 cordova-ios >= 3.8 cordova-browser >= 3.6 Phonegap build (use phonegap-version >= cli-5.2.0, android-minSdkVersion>=15, and android-build-tool=gradle), see example here Install Guides iOS Guide Android Guide Browser Guide Troubleshooting Guide F.A.Q. Bad link? Mistyped address? We're not exactly sure. Note that changes to the APPID value in your config.xml file will not be propagated to the individual platform builds. { status: "connected", authResponse: { sessionkey: true, accessToken: " ", expiresIn: 5183979, sig: ".", secret: ".", userID: "634565435" } } 5a02188284
password pro hacker facebook v1.5how to block personal account in facebookhow to private your profile picture in facebookcover photo with quotes for facebookfacebook api chat androiddownload facebook version 2.3.19gag emoticons for facebookmovie maker a facebookbest new games for facebookil tuo codice di conferma facebook
Revenir en haut
Publicité






MessagePosté le: 10/01/2018 23:01:38    Sujet du message: Publicité

PublicitéSupprimer les publicités ?
Revenir en haut
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    MASTER & COMMANDER - De la Mer à l'Histoire Index du Forum -> Pour les utilisateurs du forum MASTER & COMMANDER -> Présentations Toutes les heures sont au format GMT
Page 1 sur 1

 
Sauter vers:  

Index | Panneau d’administration | créer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation
Bluetab template design by FF8Jake of FFD
Powered by phpBB © 2001, 2018 phpBB Group
Traduction par : phpBB-fr.com