Giter Site home page Giter Site logo

telerik-verified-plugins / facebook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wizcorp/phonegap-facebook-plugin

84.0 14.0 34.0 96.95 MB

The official plugin for Facebook in Apache Cordova/PhoneGap

License: Other

Java 10.31% Objective-C 88.19% JavaScript 1.50%

facebook's Introduction

cordova-plugin-facebook4

Use Facebook SDK version 4 in Cordova projects

Installation

Make sure you've registered your Facebook app with Facebook and have an APP_ID https://developers.facebook.com/apps.

$ cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication"

Usage

This is a fork of the official plugin for Facebook in Apache Cordova that implements the latest Facebook SDK. Unless noted, this is a drop-in replacement. You don't have to replace your client code.

The Facebook plugin for Apache Cordova allows you to use the same JavaScript code in your Cordova application as you use in your web application. However, unlike in the browser, the Cordova application will use the native Facebook app to perform Single Sign On for the user. If this is not possible then the sign on will degrade gracefully using the standard dialog based authentication.

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

API

Login

facebookConnectPlugin.login(Array strings of permissions, Function success, Function failure)

NOTE : Developers should call facebookConnectPlugin.browserInit(<appId>) before login - Web App ONLY (see Web App Guide)

Success function returns an Object like:

{
	status: "connected",
	authResponse: {
		session_key: true,
		accessToken: "<long string>",
		expiresIn: 5183979,
		sig: "...",
		secret: "...",
		userID: "634565435"
	}
}

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",
		session_Key: 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 - Share Dialog:

{
	method: "share",
	href: "http://example.com",
	caption: "Such caption, very feed.",
	description: "Much description",
	picture: 'http://example.com/image.png'
	share_feedWeb: true, // iOS only
}

For iOS, the default dialog mode is FBSDKShareDialogModeAutomatic. You can share that by adding a specific dialog mode parameter. The available share dialog modes are: share_sheet, share_feedBrowser, share_native and share_feedWeb. Read more about share dialog modes

Game request:

{
	method: "apprequests",
	message: "Come on man, check out my application.",
	data: data,
	title: title,
	actionType: 'askfor',
	filters: 'app_non_users'
}

Send Dialog:

{
	method: "send",
	caption: "Check this out.",
	link: "http://example.com",
	description: "The site I told you about",
	picture: "http://example.com/image.png"
}

Share dialog - Open Graph Story: (currently only available on Android, PRs welcome for iOS)

{
	var obj = {};

	obj['og:type'] = 'objectname';
	obj['og:title'] = 'Some title';
	obj['og:url'] = 'https://en.wikipedia.org/wiki/Main_Page';
	obj['og:description'] = 'Some description.';

	var ap = {};
	
	ap['expires_in'] = 3600;
	
	var options = {
		method: 'share_open_graph', // Required
    	action: 'actionname', // Required
    	action_properties: JSON.stringify(ap), // Optional
    	object: JSON.stringify(obj) // Required
	};
}

In case you want to use custom actions/objects, just prepend the app namespace to the name (E.g: obj['og:type'] = 'appnamespace:objectname', action: 'appnamespace:actionname'. The namespace of a Facebook app is found on the Settings page.

For options information see: Facebook share dialog documentation Facebook send dialog documentation

Success function returns an Object with postId as String or from and to information when doing apprequest. Failure function returns an error String.

The Graph API

facebookConnectPlugin.api(String requestPath, Array permissions, Function success, Function failure)

Allows access to the Facebook Graph API. This API allows for additional permission because, unlike login, the Graph API can accept multiple permissions.

Example permissions:

["public_profile", "user_birthday"]

Success function returns an Object.

Failure function returns an error String.

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."

For more information see:

Events

App events allow you to understand the makeup of users engaging with your app, measure the performance of your Facebook mobile app ads, and reach specific sets of your users with Facebook mobile app ads.

Activation events are automatically tracked for you in the plugin.

Events are listed on the insights page

Log an Event

logEvent(String name, Object params, Number valueToSum, Function success, Function failure)

  • name, name of the event
  • params, extra data to log with the event (is optional)
  • valueToSum, a property which is an arbitrary number that can represent any value (e.g., a price or a quantity). When reported, all of the valueToSum properties will be summed together. For example, if 10 people each purchased one item that cost $10 (and passed in valueToSum) then they would be summed to report a number of $100. (is optional)

Log a Purchase

logPurchase(Number value, String currency, Function success, Function failure)

NOTE: Both parameters are required. The currency specification is expected to be an ISO 4217 currency code

Manually log activation events

activateApp(Function success, Function failure)

App Invites

facebookConnectPlugin.appInvite(Object options, Function success, Function failure)

Please check out the App Invites Overview before using this. The URL is expected to be an App Link.

Example options:

{
  url: "http://example.com",
  picture: "http://example.com/image.png"
}

Sample Code

facebookConnectPlugin.appInvite(
    {
        url: "http://example.com",
        picture: "http://example.com/image.png"
    },
    function(obj){
        if(obj) {
            if(obj.completionGesture == "cancel") {
                // user canceled, bad guy
            } else {
                // user really invited someone :)
            }
        } 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(["public_profile"], 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(["public_profile"], 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. ", result);
    });
  });
};

Getting a User's Birthday

Using the graph api this is a very simple task:

facebookConnectPlugin.api("<user-id>/?fields=id,email", ["user_birthday"],
  function onSuccess (result) {
    console.log("Result: ", result);
    /* logs:
      {
        "id": "000000123456789",
        "email": "[email protected]"
      }
    */
  }, function onError (error) {
    console.error("Failed: ", error);
  }
);

Publish a Photo

Send a photo to a user's feed

facebookConnectPlugin.showDialog({
    method: "share",
    picture:'https://www.google.co.jp/logos/doodles/2014/doodle-4-google-2014-japan-winner-5109465267306496.2-hp.png',
    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)
  }
);

facebook's People

Contributors

aogilvie avatar axacheng avatar blaind avatar bperin avatar digaobarbosa avatar dokterbob avatar eddyverbruggen avatar gordalina avatar goya avatar jakecraige avatar jcvalerio avatar josemedaglia avatar jrouault avatar keab42 avatar levsa avatar matiasleidemer avatar matiassingers avatar mikehayesuk avatar mixtmeta avatar pamelafox avatar robert4os avatar rosshadden avatar sebastianzillessen avatar severedsea avatar shazron avatar sinoboeckmann avatar sneko avatar stevengill avatar vergnesol avatar webmat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

facebook's Issues

success is {'status':'unknown'} after authorizing

Hi,

I am not getting proper status after authorizing the facebook instead it is giving 'unknown' status.
Am I doing wrong here? I am just calling
facebookConnectPlugin.getLoginStatus(function (success) ......

Doesn't build with Phonegap Build

The main branch of phonegap-facebook-plugin is not building with PGB. I would love to try this plugin out.

Is this plugin on NPM? I don't see it.

PGB recently added support to grab plugins directly from GitHub. http://phonegap.com/blog/2016/02/16/git-plugins/

Using:

<plugin spec="https://github.com/Telerik-Verified-Plugins/Facebook.git#v1.0.1.1" source="git">
        <param name="APP_ID" value="<%=Settings.facebook.app_id%>" />
        <param name="APP_NAME" value="<%=Settings.facebook.app_name%>" />
</plugin>

in my config.xml file. Getting the error:

Error - Plugin error (you probably need to remove plugin files from your app): //github.com/Telerik-Verified-Plugins/Facebook.git#v1.0.1.1 --var APP_ID=524549440394380 --var APP_NAME=myapp": Fetching plugin "https://github.com/Telerik-Verified-Plugins/Facebook.git" via git clone Failed to fetch plugin https://github.com/Telerik-Verified-Plugins/Facebook.git via git. Either there is a connection problems, or plugin spec is incorrect: Error: git: Command failed with exit code 1 Error output: error: pathspec 'v1.0.1.1' did not match any file(s) known to git.

Any suggestions? Thank you!

Checking FB authorization when cache is empty

Hi!

On iOs (9.3+ currently, but I assume the "issue" exists for other versions), when logging-in for the first time, the plugin will open the Facebook app, even if the authorization has already been given.
It results in opening, showing, and quickly closing (automatically) the FB app, which looks really weird.

I already use getLoginStatus to check if the user already logged in previously, but it has no effect if the app was recently installed (I guess that's because there is no cache).

window.facebookConnectPlugin.getLoginStatus(function(response) {
            if (response.status === 'connected') {
                // ...
            }

            // ...

Is there any way to avoid this behavior, by checking if the FB authorization has already been given to the app?

Thanks!

Bug with iOS 10: update the the Facebook lastest SDK

Hey,
with the release of iOS 10, the Facebook Connect login is not working anymore...
I made some research and it just need to update the latest Facebook SDK (4.15.0) to fix the bug.
Thanks in advance to your great work! Hope it will be fixed soon.

Litterature:

WIth iOS 10 beta 8 and the latest Facebook SDK it appears this issue has been resolved.

iOS facebookConnectPlugin.login callbacks never fired

On iOS, calling
facebookConnectPlugin.login(['email', 'public_profile'], _fbLoginSuccess, _fbLoginError);

shows Facebook app, does login, but after returning to app, callbacks _fbLoginSuccess or _fbLoginError are never called.
Any ideas?
Thanks

plugin contains gradle script

While building with intel xdk .Intel sdk throws build error :plugin contains gradle script.Seems it does not allows plugins with gradle scripts.Is there any solution available to resolve the problem??

Crashes after log in

On ios8 with iphone 6. Upon throwing back into my app, the spashscreen shows for several seconds then the app crashes. That makes me sad.

Make post with graphCall

Hello, tank you for this plugin !

I want to make graphCall to publish post on facebook (without the dialog) the request must called with post method. How can I do this ?

Thanks

Invalid key hash after deleting the app from an android device

Repro Steps:

  1. Configure and install everything as discussed in the plugin documentation.
  2. Install and run the app on the android device and Login to the app using Facebook Login
  3. View JSON output from the login e.g. user id, token etc
  4. Delete the app
  5. Rebuild the app and reinstall it

And invalid key hash error message shows up.

Update - I even did a production build and deployed it on the device from an external store yet it is showing the same error.

If I unauthorize the access to the app from my personal account then the issue goes away.

Error: Found item String/fb_app_id more than one time

I am using the next versions :

android 5.0.0
cordova 5.3.3

and I am getting the following error when I build in android

Execution failed for task ':mergeDebugResources'.

/...../platforms/android/res/values/facebookconnect.xml: Error: Found item String/fb_app_id more than one time

Cordova 4.0 compatibility

I'm getting this error when I try to build my app with this plugin using Cordova 4.0 (Android):

Project "Asyde App.tmp.proj" (default targets):
android Build Tooling revision 2015.6.7.1r
Warning: Note: Some input files use or override a deprecated API.
Warning: Note: Recompile with -Xlint:deprecation for details.
Warning: Note: Some input files use or override a deprecated API.
Warning: Note: Recompile with -Xlint:deprecation for details.
Warning: Note: Some input files use or override a deprecated API.
Warning: Note: Recompile with -Xlint:deprecation for details.
Warning: Note: Some input files use or override a deprecated API.
Warning: Note: Recompile with -Xlint:deprecation for details.
Warning: FAILURE:
Warning: Build failed with an exception.
Warning: * What went wrong:
Warning: Execution failed for task ':mergeArmv7ReleaseResources'.
Warning: >
Warning: /tmp/builds/HK3nYMlsCb7iv9k8dn/app/res/values/facebookconnect.xml: Error: Found item String/fb_app_id more than one time
Warning: * Try:
Warning: Run with
Warning: --stacktrace option to get the stack trace. Run with --info or
Warning: --debug option to get more log output.
Warning: /tmp/builds/HK3nYMlsCb7iv9k8dn/app/cordova/node_modules/q/q.js:126
Warning: throw e;
^
Warning: Error code 1 for command: /tmp/builds/HK3nYMlsCb7iv9k8dn/app/gradlew with args: cdvBuildRelease,-b,/tmp/builds/HK3nYMlsCb7iv9k8dn/app/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildArch=armv7,-PcdvBuildMultipleApks=true
Error: /tmp/builds/HK3nYMlsCb7iv9k8dn/app/res/values/facebookconnect.xml: Error: Found item String/fb_app_id more than one time
Error: /home/builder/BpcTooling/BuildScripts/node_build/node_modules/q/q.js:151
throw e;
^
[object Object]
Error: 'Build failed with error code 8'
Done building project "Asyde App.tmp.proj" -- FAILED.

It does save Cordova 4.0 is experimental but that Crosswalk WebView Engine support is crucial

I can not install Cordova toast plugin

I can not install Cordovatoast plugin, I get the following error:

Running command - failed!

ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

ERROR] An error occurred while running cordova plugin add https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
-... (exit code 1):

   Error: Failed to fetch plugin https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git via registry.
   Probably this is either a connection problem, or plugin spec is incorrect.
   Check your connection and plugin name/version/URL.
   Error: cmd: Command failed with exit code 1 Error output:
   npm ERR! exited with error code: 128

   npm ERR! A complete log of this run can be found in:
   npm ERR!     C:\Users\Aurora\AppData\Roaming\npm-cache\_logs\2017-07-06T08_22_04_912Z-debug.log

This are the debug file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git',
1 verbose cli '--save' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 454b1dc83236a861
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for git+https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git exited with error code: 128
8 verbose stack Error: exited with error code: 128
8 verbose stack at ChildProcess.onexit (C:\Program Files\nodejs\node_modules\npm\node_modules\mississippi\node_modules\end-of-stream\index.js:39:36)
8 verbose stack at emitTwo (events.js:125:13)
8 verbose stack at ChildProcess.emit (events.js:213:7)
8 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
9 verbose cwd C:\Users\Aurora\desktop\Coursera\Ionic\conFusion\node_modules
10 verbose Windows_NT 10.0.14393
11 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git" "--save"
12 verbose node v8.1.0
13 verbose npm v5.0.3
14 error exited with error code: 128
15 verbose exit [ 1, true ]

Build Error on Cordova Android Platform

When I build the android app the process end with error, so I had try one simple application without any other plugin installed with no problem. It seems that theres is some kind of conflict with other plugin.

The output of build process is appended bellow. Any hints?

Discovered plugin "SplashScreen" in config.xml. Installing to the project
Running command: D:\Phonegap\Oui-Chat1\Oui-Chat\platforms\android\cordova\build.bat
ANDROID_HOME=d:\android\android-sdk
JAVA_HOME=c:\Program Files\Java\jdk1.8.0_60
Running: D:\Phonegap\Oui-Chat1\Oui-Chat\platforms\android\gradlew cdvBuildDebug -b D:\Phonegap\Oui-Chat1\Oui-Chat\platforms\android\build.gradle -Dorg.gradle.daemon=true
:preBuild

:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:compileLint
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:copyDebugLint UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:mergeDebugProguardFiles UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:preBuild
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:preDebugBuild
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:checkDebugManifest
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:preDebugTestBuild
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:prepareDebugDependencies
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:compileDebugAidl UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:compileDebugRenderscript UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:generateDebugBuildConfig UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:generateDebugAssets UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:mergeDebugAssets UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:generateDebugResValues UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:generateDebugResources UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:mergeDebugResources UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:processDebugManifest UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:processDebugResources UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:generateDebugSources UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:compileDebugJava UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:processDebugJavaRes UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:packageDebugJar UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:compileDebugNdk UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:packageDebugJniLibs UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:packageDebugLocalJar UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:packageDebugRenderscript UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:packageDebugResources UP-TO-DATE
:com.phonegap.plugins.facebookconnect:ouichat-FacebookLib:bundleDebug UP-TO-DATE
:prepareAndroidComPhonegapPluginsFacebookconnectOuichatFacebookLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava UP-TO-DATE
:preDexDebug UP-TO-DATE
:dexDebug FAILED

BUILD FAILED

Total time: 4.047 secs

ERROR building one of the platforms: Error: D:\Phonegap\Oui-Chat1\Oui-Chat\platforms\android\cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project

Doesn't stack with Custom URL Scheme's url scheme

Hi

I've been manually adding the fb url scheme for ios, https://github.com/EddyVerbruggen/Custom-URL-scheme gets the precedence, the fb url scheme is overwritten

I'm not sure whether the android app requires a fb url scheme, but it's missing in the android project too (I'm guessing android doesn't need it)

Anyway, I just wanted to report the issue, I remember reading about a bug that prevented the addition of multiple url schemes, don't know whether that's still the case

IOS - Never Redirects Back to the App

Hi

I have updated with the latest version of this plugin and strangely it stopped working. When I try to login using an IPhone it opens the authorisation dialog but when I hit ok button it doesn't come back to the app.

I have googled about it but haven't found anything

Login doesn't fire native FB app on iOS

I was using an old version of this plugin in the app and had no problems, but was forced to upgrade after receiving a notice on API 2.0 deprecation. The new version works fine in every regard except that it doesn't open the native FB app on iOS. Instead, it opens a Safari page and offers me to log into FB via web. What can I do to help troubleshooting this?

Not working in iOS 10

Hi this plugin working fine in android and iOS 9. But not working in iOS 10 is there any way to fix it? I even tried by turning ON the share keychain still its not working.

Error in release Hash Android using facebookConnectPlugin.getApplicationSignature

When i execute the code:
facebookConnectPlugin.getApplicationSignature(function (response) {
console.log("App signature: " + response);
});

I get a result in my console which is not working with an '_' character. If i replace this character with a '/' character the hash key works!

Maybe you could change this in a next version

Greetings
Marcel de Groot

Falling back to web auth

Hi everyone,

I just tested this plugin and the new facebook4 fork of the origin-wizcorp-plugin, they both fall back to web auth for me, not a browser based hybrid auth either, a web auth where you have to re-enter your password

I just tested a very old version of the wizcorp plugin, that one still works, it just asks whether the user wants to open the facebook app

During this testing I used an iPod with the latest iOS and fb app

Cordova 4 iOS issue

Hi,

I have been using this plugin without a problem for a while until today, when I updated my Cordova ios to 4.0.1.

Now when I try to build my app in xcode I get the error:
/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m:27:44: No visible @interface for 'CDVPlugin' declares the selector 'initWithWebView:'

Any suggestions?

Thanks

Unable to install plugins with ionic framework app

Hello,
I am new one in ionic framework app development i want to integrate facebook in my app.
i am following give steps i get this problem when i install the given plugins, my console is:

cordova -d plugin add /Users/Desktop/Ionic 2 Demo/phonegap-facebook-plugin --save --variable APP_ID="app_id" --variable APP_NAME="App_Name"
Executing "before_plugin_add" hook for all plugins.
No version specified, retrieving version from config.xml
No version given in config.xml, attempting to use plugin engine info
Error: Registry returned 404 for GET on https://registry.npmjs.org/ideasapp
at makeError (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
at CachingRegistryClient. (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/npm-registry-client/lib/request.js:242:14)
at Request._callback (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
at Request.self.callback (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/request/request.js:199:22)
at emitTwo (events.js:100:13)
at Request.emit (events.js:185:7)
at Request. (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/request/request.js:1036:10)
at emitOne (events.js:95:20)
at Request.emit (events.js:182:7)
at IncomingMessage. (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/request/request.js:963:12)

Please help me for this problem
Thank You !!

Pay dialog

I tried use show dialog with "pay" as method and didn't work. is it posible use facebook pay dialog with this plugin?

Graph API upgrade notice

Guess you also have received the graph API notice from FB.
I am using this plugin cause its the only way i found to keep on using the native FB App for login on iOS. Any other plugin or newer SDK (facebook4) opens that safari window and says "This app was alread authorized" with the user having to interact and press OK (or cancel)...

Is there any plan to update/upgrade the used SDK/GraphAPI in this plugin?

Failed to list versions for com facebook androidfacebook android sdk

Hello,

The plugin was working correctly but now I have these errors:

- Could not resolve all dependencies for configuration ':_debugCompile'.
- Failed to list versions for com.facebook.android:facebook-android-sdk.
- Unable to load Maven meta-data from 
- https://repo1.maven.org/maven2/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
- Could not GET 'https://repo1.maven.org/maven2/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
- Connection to http://127.0.0.1:8888

When I remove the plugin I can compile the project but I need it. Please help.

Error upon install

Hello,

Since yesterday (that I've noticed), installing this plugin emits an error on NPM, namely (npm log):

34570 verbose addLocalTarball adding from inside cache /Users/dev/.npm/cordova-plugin-facebook4/1.7.1/package.tgz
34571 verbose correctMkdir /Users/dev/.npm correctMkdir not in flight; initializing
34572 verbose addRemoteGit data._from: git+https://github.com/Telerik-Verified-Plugins/Facebook.git
34573 verbose addRemoteGit data._resolved: git+https://github.com/Telerik-Verified-Plugins/Facebook.git#c0f190e23bce93d7ca49da2b7a8078736d3143aa
34574 silly cache afterAdd [email protected]
34575 verbose afterAdd /Users/dev/.npm/cordova-plugin-facebook4/1.7.1/package/package.json not in flight; writing
34576 verbose correctMkdir /Users/dev/.npm correctMkdir not in flight; initializing
34577 silly cache afterAdd [email protected]
34578 verbose afterAdd /Users/dev/.npm/cordova-plugin-facebook4/1.7.1/package/package.json already in flight; not writing
34579 verbose afterAdd /Users/dev/.npm/cordova-plugin-facebook4/1.7.1/package/package.json written
34580 silly resolveWithNewModule [email protected] checking installable status
34581 silly resolveWithNewModule [email protected] checking installable status
34582 silly addBundled read tarball
34583 silly cleanup remove extracted module
34584 silly rollbackFailedOptional Starting
34585 silly rollbackFailedOptional Finishing
34586 silly runTopLevelLifecycles Starting
34587 silly runTopLevelLifecycles Finishing
34588 silly install printInstalled
34589 verbose stack Error: EISDIR: illegal operation on a directory, read
34589 verbose stack     at Error (native)
34590 verbose cwd /Users/dev/Syone/brandbassador/brandbassador-ionic
34591 error Darwin 16.6.0
34592 error argv "/Users/dev/.nvm/versions/node/v6.7.0/bin/node" "/Users/dev/.nvm/versions/node/v6.7.0/bin/npm" "i"
34593 error node v6.7.0
34594 error npm  v3.10.3
34595 error code EISDIR
34596 error errno -21
34597 error syscall read
34598 error eisdir EISDIR: illegal operation on a directory, read
34599 error eisdir This is most likely not a problem with npm itself
34599 error eisdir and is related to npm not being able to find a package.json in
34599 error eisdir a package you are trying to install.
34600 verbose exit [ -21, true ]

How can this be fixed? Never got any issues until now..

Best Regards,
Celso Santos

Share post without a link, sample code doesn't work

Hi,

I can't find how to just share a status to Facebook without any media (link or picture).

I tried the "Get Status and Post-to-wall" sample code but Facebook returned :
Error: Error Domain=com.facebook.sdk.core Code=100 "(null)" UserInfo={com.facebook.sdk:FBSDKErrorDeveloperMessageKey=The parameter 'href' or 'media' is required}

If I add a "href" parameter, it works but I just want to share a status (plain text).

I also tried with the method feed, same problem.
Facebook talks about link parameter : The link attached to this post. With the Feed Dialog, people can also share plain text status updates with no content from your app; just leave the link parameter empty. (https://developers.facebook.com/docs/sharing/reference/feed-dialog/)
Always ask for parameter 'href' or 'media'.

If you have any solution, it will be nice.
Thank you

Invalid Key Hash in second login

Everything is working well when I log in on first time. But when I log out from my App and try to log in again, I receive the following error:

screenshot_2016-06-03-18-01-45

Uncaught ReferenceError: require is not defined

when I execute in the browser it works properly but I have to include the following in the body tag.

<div id="fb-root"></div>
<script src='lib/facebook-connect-plugin/index.js'></script>

when I execute on a device I get the following error.

Uncaught ReferenceError: require is not defined, http://192.168.199.139:8100/lib/facebook-connect-plugin/index.js, Line: 181

If I remove the script tag then I get that facebookConnectPlugin is not defined. What is the proper to use this plugin and have it working across all platforms? I am stuck here and need to work on the devices.

iOS build fails - initWithWebView error

ios/SDK/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m:27:44: error: no visible
      @interface for 'CDVPlugin' declares the selector 'initWithWebView:'
    self = (FacebookConnectPlugin *)[super initWithWebView:theWebView];

I don't know much about plugin development but I guess the solution is to just skip it, I will manually try doing it now

Always logs in using browser even when the facebook app is installed on IOS

Hi,
When logging in to Facebook, app always redirect to browser even when the facebook app is installed. I have the latest version of the plugin installed and this is happening in IOS 9.3, when I tested the same build in 8.4 it is redirecting to the Facebook app correctly. any help would be really appreciated.

Facebook Login - Cache problem

Hi,
I got a problem with "facebookConnectPlugin.getLoginStatus" method, when I make login the first time after installation, and then try to change account I cannot do it, it seems cache the login status. I tried to uninstall facebook app and messenger app but the method "GetLoginStatus" still give me the first login data.

Is this a known problem?
Thankyou,

Is it possible to reduce apk size?

When I add this plugin to my project android apk file size increased by 16MB which is too much. Previous size was only 4 MB, after adding this plugin it is now 20 MB. Is there any way to reduce this size? Why this plugin takes too much size?
Thanks

`cannot access Fragment` error when compiling for Android

I just switched from the Wizcorp/phonegap-facebook-plugin plugin to this one to workaround a compilation issue with cordova 6 on iOS.

With Telerik-Verified-Plugins/Facebook, I cannot compile for android, I get the following error:

cordova/platforms/android/src/org/apache/cordova/facebook/ConnectPlugin.java:135: error: cannot access Fragment
        shareDialog = new ShareDialog(cordova.getActivity());
                      ^
  class file for android.support.v4.app.Fragment not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
 FAILED

FAILURE: Build failed with an exception.

Any idea what goes wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.