<commit_before>## Sharing

To share an item: create it, create the service, then present the share UI:

```csharp
using Xamarin.Social;
using Xamarin.Social.Services;
...

public override void ViewDidAppear (bool animated)
{
	base.ViewDidAppear (animated);

	// 1. Create the service
	var facebook = new FacebookService {
		ClientId = "<App ID from http://developers.facebook.com/apps>"
	};

	// 2. Create an item to share
	var item = new Item {
		Text = "This is the best library I've ever used!",
	};
	item.Links.Add (new Uri ("http://xamarin.com"));

	// 3. Present the UI on iOS
	var shareViewController = facebook.GetShareUI (item, result => {
		// result lets you know if they went through with it or canceled
		DismissViewController (true, null);
	});
	PresentViewController (shareViewController, true, null);
}
```

If you're on Android, then you should present the share UI using an intent:

```csharp
protected override void OnCreate (Bundle bundle)
{
	base.OnCreate (bundle);

	...

	// 3. Present the UI on Android
	var shareIntent = facebook.GetShareUI (this, item, result => {
		// result lets you know if they went through with it or canceled
	});
	StartActivityForResult (shareIntent, 42);
}
```


## Services

Xamarin.Social comes with a variety of services that you can use to share items. Each service requires a certain number of parameters to be filled in by you:

* [App.net](https://alpha.app.net/developer/apps/) `new AppDotNetService { ClientId }`
* [Facebook](http://developers.facebook.com) `new FacebookService { ClientId }`
* [Flickr](http://www.flickr.com/services/api/) `new FlickrService { ConsumerKey, ConsumerSecret }`
* [Pinterest](http://pinterest.com) `new PinterestService ()`
* [Twitter](http://dev.twitter.com)<sup>*</sup> `new TwitterService { ConsumerKey, ConsumerSecret }`
* [Twitter](http://dev.twitter.com)<sup>5</sup> `new Twitter5Service ()`

<sup>*</sup> make sure that your Twitter app has an authentication callback URL registered in Twitter's app settings.

<sup>5</sup> uses native iOS 5 user interfaces and accounts (only available on iOS 5 and newer).





## Share Items

To share some text, links, or images, fill out an `Item` object and call `GetShareUI`. The share UI will allow the user to select the account that they want to use so you don't need to provide one. The UI will also allow the user to edit the item's text before it is posted.<commit_msg>We don't handle <sup>, remove<commit_after>## Sharing

To share an item: create it, create the service, then present the share UI:

```csharp
using Xamarin.Social;
using Xamarin.Social.Services;
...

public override void ViewDidAppear (bool animated)
{
	base.ViewDidAppear (animated);

	// 1. Create the service
	var facebook = new FacebookService {
		ClientId = "<App ID from http://developers.facebook.com/apps>"
	};

	// 2. Create an item to share
	var item = new Item {
		Text = "This is the best library I've ever used!",
	};
	item.Links.Add (new Uri ("http://xamarin.com"));

	// 3. Present the UI on iOS
	var shareViewController = facebook.GetShareUI (item, result => {
		// result lets you know if they went through with it or canceled
		DismissViewController (true, null);
	});
	PresentViewController (shareViewController, true, null);
}
```

If you're on Android, then you should present the share UI using an intent:

```csharp
protected override void OnCreate (Bundle bundle)
{
	base.OnCreate (bundle);

	...

	// 3. Present the UI on Android
	var shareIntent = facebook.GetShareUI (this, item, result => {
		// result lets you know if they went through with it or canceled
	});
	StartActivityForResult (shareIntent, 42);
}
```


## Services

Xamarin.Social comes with a variety of services that you can use to share items. Each service requires a certain number of parameters to be filled in by you:

* [App.net](https://alpha.app.net/developer/apps/) `new AppDotNetService { ClientId }`
* [Facebook](http://developers.facebook.com) `new FacebookService { ClientId }`
* [Flickr](http://www.flickr.com/services/api/) `new FlickrService { ConsumerKey, ConsumerSecret }`
* [Pinterest](http://pinterest.com) `new PinterestService ()`
* [Twitter](http://dev.twitter.com) `new TwitterService { ConsumerKey, ConsumerSecret }`
* [Twitter](http://dev.twitter.com)* `new Twitter5Service ()`

\* `Twitter5Service` uses iOS 5-specific UI and account settings.



## Share Items

To share some text, links, or images, fill out an `Item` object and call `GetShareUI`. The share UI will allow the user to select the account that they want to use so you don't need to provide one. The UI will also allow the user to edit the item's text before it is posted.
{'fraction_non_alphanumeric': 0.11527748017998714, 'fraction_numerical': 0.004285408185129634, 'mean_word_length': 4.1694352159468435, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3597529', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1339, 'n_words': 552}