Merge pull request #543 from phonegap/develop

Develop
Added support for Share Open Graph dialogs.
Added support for simple Share dialog.
Merge pull request #556 from subtleknife/Add-Share-Dialog

Add Android support for Share and Share_Open_Graph dialogs
login function callbacks are not called

When calling `login` method with `public_profile` neither `success` or `failure` callback are called when in iOS and native iOS facebook integration account is signed out.

I have been investigation this issue and it is because on my app page `public_profile` gives an error (see below raw request/response). I **think** this might be a facebook issue, but nonetheless the login function **must** call the callback.

By switching from `public_profile` to `basic_info` (which as far as I know was inferred automatically before, but it isn't now) everything works.

By reading the source on [FacebookConnectPlugin.m:255](https://github.com/Wizcorp/phonegap-facebook-plugin/blob/master/platforms/ios/HelloCordova/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m#L255) the `FBSession::openActiveSessionWithReadPersmissions] is called which in turn will call back `sessionStateChanged` with `state=FBSessionStateClosedLoginFailed` which has the error [https://github.com/facebook/facebook-ios-sdk/blob/master/src/Core/FBError.m#L34](SystemLoginCancelled). (see the log below)

**Note** This error occurs only when native ios facebook is signed in. When signed out it works.

**Request**
```
GET /method/permissions.getiosdescription?access_token=CENSORED&format=json&locale=en&permissions=public_profile&write_privacy=
```

**Response**
```
{
	"error_code": 100,
	"error_msg": "invalid permissions: public_profile",
	"request_args": [{
		"key": "method",
		"value": "permissions.getiosdescription"
	}, {
		"key": "access_token",
		"value": "CENSORED"
	}, {
		"key": "format",
		"value": "json"
	}, {
		"key": "locale",
		"value": "en"
	}, {
		"key": "permissions",
		"value": "public_profile"
	}, {
		"key": "write_privacy",
		"value": ""
	}]
}
```

## FBError
```
Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x10ad15ab0 
{
  com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:SystemLoginCancelled, 
  com.facebook.sdk:ErrorInnerErrorKey=Error Domain=com.apple.accounts Code=7 "The operation couldn’t be completed. (com.apple.accounts error 7.)", 
  com.facebook.sdk:ErrorSessionKey=<FBSession: 0x10ad3e060, 
  state: FBSessionStateClosedLoginFailed, 
  loginHandler: 0x0, 
  appID: 891837340830467, 
  urlSchemeSuffix: , 
  tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x10ba3dd20>, 
  expirationDate: (null), 
  refreshDate: (null), 
  attemptedRefreshDate: 0001-12-30 00:00:00 +0000, 
  permissions:(null)>
}
```
added missing message param - issue #559
Return object instead of just postId - issue #559
Merge pull request #566 from aogilvie/fix/js-message-check

added missing message param - issue #559
Merge pull request #567 from aogilvie/fix/js-ui-response-object

Return object instead of just postId - issue #559
Added guide for creating a WebApp with Parse.com
Merge pull request #568 from aogilvie/feature/guide-to-parse-webapp

Added guide for creating a WebApp with Parse.com
add enable cookie setting
Merge pull request #570 from aogilvie/fix/enable-webapp-cookie

add enable cookie setting
first stab at FBEvents
Small efficiency refactor, added sample app code
added first hit at Android AppEvents
updated ios sample to Cordova 3.4
polyfil this function for JS SDK
updated js for plugman
updated description in plugin.xml