diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..63625e9d7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing to PhoneGap Facebook Plugin + +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: + +The following is a set of guidelines for contributing to the PhoneGap Facebook Connect Plugin. + +These are just guidelines, not rules, use your best judgement and feel free to propose changes to this document in a pull request. + +## Getting Help + +Before creating a Github issue make sure you... + +- Check the [Troubleshooting Guide](TROUBLESHOOTING.md) for well known issues. +- Search the [issues list](https://github.com/Wizcorp/phonegap-facebook-plugin/issues) for existing closed or still open issues +- Create a Github issue + +#### Creating an Issue + +When submitting an issue please add as much of the following information: + +- Tell us what you expected to happen and what actually happened. ("It doesn't work" is **not** a solveable problem) +- Provide sample code so people can test and debug the problem. +- Provide `adb logcat` or Xcode console output. + +Can you solve the problem yourself? If so see the next section on Pull Requests and send us the fix!!! <3 + +## Pull Requests + +- Include screenshots and animated GIFs in your pull request whenever possible. +- Try to follow the [JavaScript](https://github.com/Wizcorp/javascript-styleguide/blob/master/README.md), [Objective-C](http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml) or [Java](https://google-styleguide.googlecode.com/svn/trunk/javaguide.html) style guides. Although these are just guides, please at least support continuety (that means **using 4 spaces please**). +- **Send your pull request to the develop branch.** +- If you can, provide sample testing code. \ No newline at end of file diff --git a/README.md b/README.md index 5e9cae0e3..f9daa17c7 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ For a more instructive example change the above `fbLoginSuccess` to; ### Getting a User's Birthday -Using the graph api this is a very simple task: [currently iOS only!] +Using the graph api this is a very simple task: facebookConnectPlugin.api("/?fields=id,email", ["user_birthday"], function (result) { diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index e2f09c5cf..a2f827c50 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -1,6 +1,6 @@ # Troubleshooting -If you cannot solve your issue here please check the **existing issues** on Github, if you still cannot find a solution please [create an issue](https://github.com/Wizcorp/phonegap-facebook-plugin/issues). +Can't solve your issue here? Check the [existing issues](https://github.com/Wizcorp/phonegap-facebook-plugin/issues) on Github. If you still cannot find a solution please [create and issue after reading the contributing guide](CONTRIBUTING.md). When creating a Github issue **remember to**: @@ -19,6 +19,7 @@ When creating a Github issue **remember to**: - [No Reply From Login?](#no-reply-from-login) - [My Hash Does Not Work, I am Using Windows](#my-hash-does-not-work-i-am-using-windows) - [Jar mismatch! Fix your dependencies](#jar-mismatch-fix-your-dependencies) + - [Open Fullscreen Dialog in Landscape Orientation](#open-fullscreen-dialog-in-landscape-orientation) - [**iOS**](#ios) - [Missing FacebookConnectPlugin](#missing-facebookconnectplugin) @@ -126,6 +127,52 @@ BUILD FAILED - Solution - You may have duplicate android-support-v4.jar files. Remove android-support-v4.jar from the `/libs` folder of your project. +### Open Fullscreen Dialog in Landscape Orientation +- Problem: + - In landscape orientation the dialog is too small to use keyboard input + +- Solution: + - One can force the dialog to be displayed fullscreen, providing additional screen space for the dialog + +Add this import to `facebookConnectPlugin.java` + +`import android.content.res.Configuration;` + +Change the feed dialog from: + +``` +WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(me.cordova.getActivity(), Session.getActiveSession(), paramBundle)).setOnCompleteListener(dialogCallback).build(); +feedDialog.show(); +``` + +to + +``` +WebDialog.FeedDialogBuilder feedDialog = (new WebDialog.FeedDialogBuilder(me.cordova.getActivity(), Session.getActiveSession(), paramBundle)).setOnCompleteListener(dialogCallback); +if (cordova.getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { + feedDialog.setTheme(android.R.style.Theme_Wallpaper_NoTitleBar_Fullscreen); +} +feedDialog.build().show(); +``` + +Change the feed dialog from: + +``` +WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(me.cordova.getActivity(), Session.getActiveSession(), paramBundle)).setOnCompleteListener(dialogCallback) + .build(); +requestsDialog.show(); +``` + +to + +``` +WebDialog.RequestsDialogBuilder requestsDialog = (new WebDialog.RequestsDialogBuilder(me.cordova.getActivity(), Session.getActiveSession(), paramBundle)).setOnCompleteListener(dialogCallback); +if (cordova.getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { + requestsDialog.setTheme(android.R.style.Theme_Wallpaper_NoTitleBar_Fullscreen); +} +requestsDialog.build().show(); +``` + ## iOS ### Missing FacebookConnectPlugin - Problem: diff --git a/platforms/android/README.md b/platforms/android/README.md index 95c7b9ea1..e66c50c73 100644 --- a/platforms/android/README.md +++ b/platforms/android/README.md @@ -30,50 +30,8 @@ $ cordova platform add android $ cordova -d plugin add /path/to/cloned/phonegap-facebook-plugin --variable APP_ID="123456789" --variable APP_NAME="myApplication" ``` -## Setup with Eclipse +You can now use the plugin right away -**Android requires an additional step which is to reference the FacebookSDK project as a library to your project.** +## Setup with Eclipse (Removed) -Open your project in Eclipse (New > Project... Existing Android project from source), import everything (***see Img. 1***). - -![image](./android_setup_1.png) ***Img. 1*** - -In Eclipse, right click your project folder in the left-had column. Select "Properties", select Android in the left column and in the right side of the window add FacebookSDK as a library (***see Img. 2***). - -![image](./android_setup_2.png) ***Img. 2*** - - -## Setup without Eclipse (just CLI) - -Follow the steps below: - - cordova create myApp - - cd myApp/ - - cordova platform add android - - cordova -d plugin add https://github.com/phonegap/phonegap-facebook-plugin.git --variable APP_ID="123456789" --variable APP_NAME="myApplication" - - android update project --subprojects --path "platforms/android" --target android-19 --library "CordovaLib" - - android update project --subprojects --path "platforms/android" --target android-19 --library "com.phonegap.plugins.facebookconnect/FacebookLib" - - cd platforms/android/ - - ant clean - - cd com.phonegap.plugins.facebookconnect/FacebookLib - - ant clean - - open -e AndroidManifest.xml - - // change your minSdkVersion and your targetSdkVersion to your environment settings for me it was: - // - - ant release - - cd ../../.. - - cordova build android +** You no longer need the additional Eclipse steps. A custom_rules.xml file was added for configuring ANT properly. \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index 6200ff30c..6290f4f83 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="0.10.1"> Facebook Connect