Android – Share on Facebook, Twitter, Mail, ecc

Paresh Mayani’s answer is mostly correct. Simply use a Broadcast Intent to let the system and all the other apps choose in what way the content is going to be shared. To share text use the following code: String message = “Text I want to share.”; Intent share = new Intent(Intent.ACTION_SEND); share.setType(“text/plain”); share.putExtra(Intent.EXTRA_TEXT, message); startActivity(Intent.createChooser(share, … Read more

Best java twitter library? [closed]

I just took a look at them. JTwitter definitely looks like the weakest of the three. It doesn’t appear to have been updated lately, doesn’t cover much of the Twitter API, and doesn’t appear to have any releases besides the initial one. On the upside, it’s LPGL licensed, comes packaged with what little extra code … Read more

How to access elements of a JArray (or iterate over them)

There is a much simpler solution for that. Just treat the items of the JArray as JObject. Let’s say we have such array of JSON objects: JArray jArray = JArray.Parse(@”[ { “”name””: “”Croke Park II””, “”url””: “”http://twitter.com/search?q=%22Croke+Park+II%22″”, “”promoted_content””: null, “”query””: “”%22Croke+Park+II%22″”, “”events””: null }, { “”name””: “”Siptu””, “”url””: “”http://twitter.com/search?q=Siptu””, “”promoted_content””: null, “”query””: “”Siptu””, “”events””: null … Read more

Owin Twitter login – the remote certificate is invalid according to the validation procedure

Thanks to the power of open source we can see that the thumbprints for the twitter certificates have been coded in the Katana Project. Microsoft.Owin.Security.Twitter.TwitterAuthenticationOptions Recently some certificates must have changed and now the thumbprints no longer match. Please add a new thumb print for the “VeriSign Class 3 Public Primary Certification Authority – G5” … Read more