Rectangle 27 1

The activityItems parameter should contain the things you want to share. If it's a string or URL, the system should figure out which share extensions and action extensions apply based on the context. You can get more customized.

UIActivityType.postToTwitter

Just pass an array of things to share (like a String and URL) and Twitter should be able to figure out what you mean and the icon will be shown.

ios - Twitter and Facebook won't appear on UIActivityViewController Sw...

ios swift xcode facebook twitter
Rectangle 27 17

The facebook javascript API allows you to share and gives you a callback

FB.ui(
   {
     method: 'feed',
     name: 'Facebook Dialogs',
     link: 'http://developers.facebook.com/docs/reference/dialogs/',
     picture: 'http://fbrell.com/f8.jpg',
     caption: 'Reference Documentation',
     description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
     message: 'Facebook Dialogs are easy!'
   },
   function(response) {
     if (response && response.post_id) {
       alert('Post was published.');
     } else {
       alert('Post was not published.');
     }
   }
 );

To use this you need to have set up a facebook application and put the following code directly after the opening body tag

<div id="fb-root">
</div>
<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
<script type="text/javascript">
    FB.init({
        appId: YOUR_API_KEY,
        status: true,
        cookie: true,
        xfbml: true
    });
    FB.Canvas.setAutoResize();
</script>

If you ask for basic permissions, you could then get the users facebook id and use this to store which users had shared.

The FB JS code can be anywhere in your code, header, footer, in the body, it all works. The only thing that needs to be right after the body tag is the div.

You can put the div where ever you want and it works.

I need to have the application, and I cannot share the links which not allowed in application.

@Tom and what about twitter callback ?

Twitter and facebook share with callbacks? - Stack Overflow

facebook twitter
Rectangle 27 15

For Twitter call with callback, that is how I did it in Javascript:

// Include the Twitter Library
window.twttr = (function (d,s,id) {
  var t, js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
  js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
  return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));

// On ready, register the callback...
twttr.ready(function (twttr) {
    twttr.events.bind('tweet', function (event) {
        // your callback action here...
    });
});

The twitter link is like this:

<a href="https://twitter.com/intent/tweet?url=URLTOBESHARED">Share on Twitter</a>

@tauan-scheidt-zimmermann callback is not working. There was no response after tweet .. can you check it ?

Twitter and facebook share with callbacks? - Stack Overflow

facebook twitter
Rectangle 27 6

@rckoenes is correct. Under normal circumstances there is no way to manually send the user to preferences. There was a method of doing this introduced in iOS 5, but Apple quickly depreciated it in iOS 5.0.1 or 5.1 I don't remember exactly which one.

Now, on to the current situation. If you are using an SLComposeViewController in the Social Framework, you don't even have to worry about adding this functionality yourself. It is done automatically by iOS. Below is a screenshot from my 6.0 simulator attempting to post to Facebook without any accounts signed in. This is also true for Twitter and Sina Weibo.

What a shame... I hope Apple fixes it the sooner the better. I don't see the point on using the dialog you are showing, with the compose, and not with the "login" and the other functions...

This Alert view only appears on simulator, on devices it will not appear. It seems that this is a bug!

What if Twitter or Facebook accounts are not configured on iOS 6? - St...

ios facebook twitter ios6 social-framework
Rectangle 27 29

They won't show when you don't have Twitter and Facebook accounts set up in settings. Facebook or twitter app are not enough - you should have explicitly set accounts. Maybe it's not really cool, (user may want to share something on fb or twitter and perform login for it) but Apple considered these activities should work so in iOS 7.

(Or they didn't have time to fix the bug ;) )

Even i faced the same issue and adding twitter and facebook credentials in settings did the wonder. In iOS7 Apple have done stupid changes.

It's not just for iOS 7. The same behavior in iOS 6 as well. I hoped this behavior would be changed in iOS 7 but it didn't... Maybe they didn't want to promote those social media but they should have provided a choice to developers.

on iOS 8.3 facebook seems to be missing, even thou on a user device it been set up... @Petro what do you mean by explicitly set accounts?

objective c - UIActivityViewController doesn't show FB and Twitter on ...

ios objective-c facebook twitter uiactivityviewcontroller
Rectangle 27 29

I found that I needed 3 forward slashes for twitter, and only 2 for Facebook and Google+, I didn't investigate more than that

// Go to https://graph.facebook.com/PageName to get your page id
func openFacebookPage() {
    let facebookURL = NSURL(string: "fb://profile/PageId")!
    if UIApplication.sharedApplication().canOpenURL(facebookURL) {
        UIApplication.sharedApplication().openURL(facebookURL)
    } else {
        UIApplication.sharedApplication().openURL(NSURL(string: "https://www.facebook.com/PageName")!)
    }
}

func openTwitterProfile() {
    let twitterURL = NSURL(string: "twitter:///user?screen_name=USERNAME")!
    if UIApplication.sharedApplication().canOpenURL(twitterURL) {
        UIApplication.sharedApplication().openURL(twitterURL)
    } else {
        UIApplication.sharedApplication().openURL(NSURL(string: "https://twitter.com/USERNAME")!)
    }
}

func openGooglePlusPage() {
    let googlePlusURL = NSURL(string: "gplus://plus.google.com/u/0/PageId")!
    if UIApplication.sharedApplication().canOpenURL(googlePlusURL) {
        UIApplication.sharedApplication().openURL(googlePlusURL)
    } else {
        UIApplication.sharedApplication().openURL(NSURL(string: "https://plus.google.com/PageId")!)
    }
}
struct SocialNetworkUrl {
    let scheme: String
    let page: String

    func openPage() {
        let schemeUrl = NSURL(string: scheme)!
        if UIApplication.sharedApplication().canOpenURL(schemeUrl) {
            UIApplication.sharedApplication().openURL(schemeUrl)
        } else {
            UIApplication.sharedApplication().openURL(NSURL(string: page)!)
        } 
    }
}

enum SocialNetwork {
    case Facebook, GooglePlus, Twitter, Instagram
    func url() -> SocialNetworkUrl {
        switch self {
        case .Facebook: return SocialNetworkUrl(scheme: "fb://profile/PageId", page: "https://www.facebook.com/PageName")
        case .Twitter: return SocialNetworkUrl(scheme: "twitter:///user?screen_name=USERNAME", page: "https://twitter.com/USERNAME")
        case .GooglePlus: return SocialNetworkUrl(scheme: "gplus://plus.google.com/u/0/PageId", page: "https://plus.google.com/PageId")
        case .Instagram: return SocialNetworkUrl(scheme: "instagram://user?username=USERNAME", page:"https://www.instagram.com/USERNAME")
        }
    }
    func openPage() {
        self.url().openPage()
    }
}
SocialNetwork.Twitter.openPage()

this doesn't seem to work, because of the url. I have to change the url from "fb:///profile/PageId" to "fb://profile/PageId"

Thanks for the feedback @NutchaphonRewik, I ended up using // and not /// for fb but forgot to edit my answer. It's corrected now.

In my case, "fb://profile/PageId"- its opening News Feed; not the Facebook page :(

@AviC Did you make sure you changed the page value (replacing PageName)?

Open link to Facebook page from iOS app - Stack Overflow

ios facebook
Rectangle 27 53

I don't know if that's what you mean but you can use the Android built-in sharing menu...

You can share a URL to Facebook, Twitter, Gmail and more (as long as the apps are installed on your device) using Intents:

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_SUBJECT, "Sharing URL");
i.putExtra(Intent.EXTRA_TEXT, "http://www.url.com");
startActivity(Intent.createChooser(i, "Share URL"));

If the app you want to share to is not installed on the user's device, for example - facebook, then you'll have to use Facebook SDK.

If you want your Activity to handle text data shared from other apps as well, you can add this to your AndroidManifest.xml:

<activity android:name=".ShareLink">
    <intent-filter>
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="text/plain" />
    </intent-filter>
</activity>

I am looking for a solution without using the installed apps.

This doesn't work with Facebook

thank you , i have changed from text/html to text/plain and this worked fine ,in addition to adding intent filter section to the activity

There's no reason to add that to the manifest. It will work fine with just the Java snippet.

@Jarett yeah, I know... it's from 2010, I was young :) updated. Thanks

Sharing URL to Facebook, Twitter and email in Android? - Stack Overflo...

android facebook email twitter sharing
Rectangle 27 53

I don't know if that's what you mean but you can use the Android built-in sharing menu...

You can share a URL to Facebook, Twitter, Gmail and more (as long as the apps are installed on your device) using Intents:

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_SUBJECT, "Sharing URL");
i.putExtra(Intent.EXTRA_TEXT, "http://www.url.com");
startActivity(Intent.createChooser(i, "Share URL"));

If the app you want to share to is not installed on the user's device, for example - facebook, then you'll have to use Facebook SDK.

If you want your Activity to handle text data shared from other apps as well, you can add this to your AndroidManifest.xml:

<activity android:name=".ShareLink">
    <intent-filter>
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="text/plain" />
    </intent-filter>
</activity>

I am looking for a solution without using the installed apps.

This doesn't work with Facebook

thank you , i have changed from text/html to text/plain and this worked fine ,in addition to adding intent filter section to the activity

There's no reason to add that to the manifest. It will work fine with just the Java snippet.

@Jarett yeah, I know... it's from 2010, I was young :) updated. Thanks

Sharing URL to Facebook, Twitter and email in Android? - Stack Overflo...

android facebook email twitter sharing
Rectangle 27 468

This technique has mostly been supplanted by the ability to use the JavaScript History API that was introduced alongside HTML5. For a URL like www.example.com/ajax.html#!key=value, Google will check the URL www.example.com/ajax.html?_escaped_fragment_=key=value to fetch a non-AJAX version of the contents.

Are you sure that is all there is to it? I often find that the page loading hangs on a shebang URL on facebook (even after many reloads), but if you manually remove the #!, it works. Not to mention you often get "1.5 URLs" (i.e. the old URL remains, and just has the new part added to it (i.e. photo.php?id=... twice, but with different ids). Not to mention that "#!" is also added to facebook-mail URLs, which probably aren't (and shouldn't be) indexable. In any case I find the shebang extremely annoying since it seems to be the reason for so many page faults on my slow home line.

That Facebook has bugs doesn't make those bugs the fault of two characters in the URL. If the site is coded properly to understand and generate them, crawlable AJAX URLs are quite handy. Lots of other things on Facebook glitch out, too.

@Pedery: I have only ever seen that issue with Facebook. I agree, it drives me up the (non-Facebook) wall all the time.

As for search engines, having an indexable AJAX URL doesn't make the page get indexed anymore than having an indexable non AJAX URL does. Facebook uses this URL format for more than just Google's benefit - it also makes pages accessed via AJAX on Facebook bookmarkable when they otherwise wouldn't be.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 468

This technique has mostly been supplanted by the ability to use the JavaScript History API that was introduced alongside HTML5. For a URL like www.example.com/ajax.html#!key=value, Google will check the URL www.example.com/ajax.html?_escaped_fragment_=key=value to fetch a non-AJAX version of the contents.

Are you sure that is all there is to it? I often find that the page loading hangs on a shebang URL on facebook (even after many reloads), but if you manually remove the #!, it works. Not to mention you often get "1.5 URLs" (i.e. the old URL remains, and just has the new part added to it (i.e. photo.php?id=... twice, but with different ids). Not to mention that "#!" is also added to facebook-mail URLs, which probably aren't (and shouldn't be) indexable. In any case I find the shebang extremely annoying since it seems to be the reason for so many page faults on my slow home line.

That Facebook has bugs doesn't make those bugs the fault of two characters in the URL. If the site is coded properly to understand and generate them, crawlable AJAX URLs are quite handy. Lots of other things on Facebook glitch out, too.

@Pedery: I have only ever seen that issue with Facebook. I agree, it drives me up the (non-Facebook) wall all the time.

As for search engines, having an indexable AJAX URL doesn't make the page get indexed anymore than having an indexable non AJAX URL does. Facebook uses this URL format for more than just Google's benefit - it also makes pages accessed via AJAX on Facebook bookmarkable when they otherwise wouldn't be.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 468

This technique has mostly been supplanted by the ability to use the JavaScript History API that was introduced alongside HTML5. For a URL like www.example.com/ajax.html#!key=value, Google will check the URL www.example.com/ajax.html?_escaped_fragment_=key=value to fetch a non-AJAX version of the contents.

Are you sure that is all there is to it? I often find that the page loading hangs on a shebang URL on facebook (even after many reloads), but if you manually remove the #!, it works. Not to mention you often get "1.5 URLs" (i.e. the old URL remains, and just has the new part added to it (i.e. photo.php?id=... twice, but with different ids). Not to mention that "#!" is also added to facebook-mail URLs, which probably aren't (and shouldn't be) indexable. In any case I find the shebang extremely annoying since it seems to be the reason for so many page faults on my slow home line.

That Facebook has bugs doesn't make those bugs the fault of two characters in the URL. If the site is coded properly to understand and generate them, crawlable AJAX URLs are quite handy. Lots of other things on Facebook glitch out, too.

@Pedery: I have only ever seen that issue with Facebook. I agree, it drives me up the (non-Facebook) wall all the time.

As for search engines, having an indexable AJAX URL doesn't make the page get indexed anymore than having an indexable non AJAX URL does. Facebook uses this URL format for more than just Google's benefit - it also makes pages accessed via AJAX on Facebook bookmarkable when they otherwise wouldn't be.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 63

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, "Title of the dialog the system will open"));

@Janusz: Aren't there any way to directly get the Facebook sharing? I mean without not allowing the system to open the list of names(facebook,email,twitter,etc) for select the particular name

Yes you can integrate the Facebook SDK and use the sharing options directly. I wouldn't recommend it. It takes a lot of time for a result that is worse then this 5 lines.

But, If I want to distinguish between Twitter and others to choose the text I want to share, how can it be done?

Many irrelevant apps show up in the list - which have nothing to do with sharing any text - how do i filter and show only meaningful ones (like sms, twitter, facebook, whatsapp and not some random e-commerce app)

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

Android - Share on Facebook, Twitter, Mail, ecc - Stack Overflow

android facebook twitter share
Rectangle 27 213

The octothorpe/number-sign/hashmark has a special significance in an URL, it normally identifies the name of a section of a document. The precise term is that the text following the hash is the anchor portion of an URL. If you use Wikipedia, you will see that most pages have a table of contents and you can jump to sections within the document with an anchor, such as:

https://en.wikipedia.org/wiki/Alan_Turing identifies the page and Early_computers_and_the_Turing_test is the anchor. The reason that Facebook and other Javascript-driven applications (like my own Wood & Stones) use anchors is that they want to make pages bookmarkable (as suggested by a comment on that answer) or support the back button without reloading the entire page from the server.

In order to support bookmarking and the back button, you need to change the URL. However, if you change the page portion (with something like window.location = 'http://raganwald.com';) to a different URL or without specifying an anchor, the browser will load the entire page from the URL. Try this in Firebug or Safari's Javascript console. Load http://minimal-github.gilesb.com/raganwald. Now in the Javascript console, type:

You will see the page refresh from the server. Now type:

window.location = 'http://minimal-github.gilesb.com/raganwald#and_this';

Still no refresh. Use the back button to see that these URLs are in the browser history. The browser notices that we are on the same page but just changing the anchor, so it doesn't reload. Thanks to this behaviour, we can have a single Javascript application that appears to the browser to be on one 'page' but to have many bookmarkable sections that respect the back button. The application must change the anchor when a user enters different 'states', and likewise if a user uses the back button or a bookmark or a link to load the application with an anchor included, the application must restore the appropriate state.

So there you have it: Anchors provide Javascript programmers with a mechanism for making bookmarkable, indexable, and back-button-friendly applications. This technique has a name: It is a Single Page Interface.

p.s. There is a fourth benefit to this technique: Loading page content through AJAX and then injecting it into the current DOM can be much faster than loading a new page. In addition to the speed increase, further tricks like loading certain portions in the background can be performed under the programmer's control.

p.p.s. Given all of that, the 'bang' or exclamation mark is a further hint to Google's web crawler that the exact same page can be loaded from the server at a slightly different URL. See Ajax Crawling. Another technique is to make each link point to a server-accessible URL and then use unobtrusive Javascript to change it into an SPI with an anchor.

"However an application without this optimization is still crawlable if the web crawler wishes to index it." Not really. The hash doesn't get sent to the server.

just for information: self.document.location.hash provides the value of this hash

@imaginonic: I'm late, but as perfectly crafted as it is, 90% of it doesn't touch on the #! aspect of my question at all. That's why he said it's redundant. The number of upvotes here is likely due to the high traffic when my question made it to Hacker News coupled with the sheer length alone of this answer.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 213

The octothorpe/number-sign/hashmark has a special significance in an URL, it normally identifies the name of a section of a document. The precise term is that the text following the hash is the anchor portion of an URL. If you use Wikipedia, you will see that most pages have a table of contents and you can jump to sections within the document with an anchor, such as:

https://en.wikipedia.org/wiki/Alan_Turing identifies the page and Early_computers_and_the_Turing_test is the anchor. The reason that Facebook and other Javascript-driven applications (like my own Wood & Stones) use anchors is that they want to make pages bookmarkable (as suggested by a comment on that answer) or support the back button without reloading the entire page from the server.

In order to support bookmarking and the back button, you need to change the URL. However, if you change the page portion (with something like window.location = 'http://raganwald.com';) to a different URL or without specifying an anchor, the browser will load the entire page from the URL. Try this in Firebug or Safari's Javascript console. Load http://minimal-github.gilesb.com/raganwald. Now in the Javascript console, type:

You will see the page refresh from the server. Now type:

window.location = 'http://minimal-github.gilesb.com/raganwald#and_this';

Still no refresh. Use the back button to see that these URLs are in the browser history. The browser notices that we are on the same page but just changing the anchor, so it doesn't reload. Thanks to this behaviour, we can have a single Javascript application that appears to the browser to be on one 'page' but to have many bookmarkable sections that respect the back button. The application must change the anchor when a user enters different 'states', and likewise if a user uses the back button or a bookmark or a link to load the application with an anchor included, the application must restore the appropriate state.

So there you have it: Anchors provide Javascript programmers with a mechanism for making bookmarkable, indexable, and back-button-friendly applications. This technique has a name: It is a Single Page Interface.

p.s. There is a fourth benefit to this technique: Loading page content through AJAX and then injecting it into the current DOM can be much faster than loading a new page. In addition to the speed increase, further tricks like loading certain portions in the background can be performed under the programmer's control.

p.p.s. Given all of that, the 'bang' or exclamation mark is a further hint to Google's web crawler that the exact same page can be loaded from the server at a slightly different URL. See Ajax Crawling. Another technique is to make each link point to a server-accessible URL and then use unobtrusive Javascript to change it into an SPI with an anchor.

"However an application without this optimization is still crawlable if the web crawler wishes to index it." Not really. The hash doesn't get sent to the server.

just for information: self.document.location.hash provides the value of this hash

@imaginonic: I'm late, but as perfectly crafted as it is, 90% of it doesn't touch on the #! aspect of my question at all. That's why he said it's redundant. The number of upvotes here is likely due to the high traffic when my question made it to Hacker News coupled with the sheer length alone of this answer.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 213

The octothorpe/number-sign/hashmark has a special significance in an URL, it normally identifies the name of a section of a document. The precise term is that the text following the hash is the anchor portion of an URL. If you use Wikipedia, you will see that most pages have a table of contents and you can jump to sections within the document with an anchor, such as:

https://en.wikipedia.org/wiki/Alan_Turing identifies the page and Early_computers_and_the_Turing_test is the anchor. The reason that Facebook and other Javascript-driven applications (like my own Wood & Stones) use anchors is that they want to make pages bookmarkable (as suggested by a comment on that answer) or support the back button without reloading the entire page from the server.

In order to support bookmarking and the back button, you need to change the URL. However, if you change the page portion (with something like window.location = 'http://raganwald.com';) to a different URL or without specifying an anchor, the browser will load the entire page from the URL. Try this in Firebug or Safari's Javascript console. Load http://minimal-github.gilesb.com/raganwald. Now in the Javascript console, type:

You will see the page refresh from the server. Now type:

window.location = 'http://minimal-github.gilesb.com/raganwald#and_this';

Still no refresh. Use the back button to see that these URLs are in the browser history. The browser notices that we are on the same page but just changing the anchor, so it doesn't reload. Thanks to this behaviour, we can have a single Javascript application that appears to the browser to be on one 'page' but to have many bookmarkable sections that respect the back button. The application must change the anchor when a user enters different 'states', and likewise if a user uses the back button or a bookmark or a link to load the application with an anchor included, the application must restore the appropriate state.

So there you have it: Anchors provide Javascript programmers with a mechanism for making bookmarkable, indexable, and back-button-friendly applications. This technique has a name: It is a Single Page Interface.

p.s. There is a fourth benefit to this technique: Loading page content through AJAX and then injecting it into the current DOM can be much faster than loading a new page. In addition to the speed increase, further tricks like loading certain portions in the background can be performed under the programmer's control.

p.p.s. Given all of that, the 'bang' or exclamation mark is a further hint to Google's web crawler that the exact same page can be loaded from the server at a slightly different URL. See Ajax Crawling. Another technique is to make each link point to a server-accessible URL and then use unobtrusive Javascript to change it into an SPI with an anchor.

"However an application without this optimization is still crawlable if the web crawler wishes to index it." Not really. The hash doesn't get sent to the server.

just for information: self.document.location.hash provides the value of this hash

@imaginonic: I'm late, but as perfectly crafted as it is, 90% of it doesn't touch on the #! aspect of my question at all. That's why he said it's redundant. The number of upvotes here is likely due to the high traffic when my question made it to Hacker News coupled with the sheer length alone of this answer.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 4

1) Social.Framework is available only on iOS6+ so you have to split between the two frameworks (or you can use only Twitter.Framework even though some methods have been deprecated on iOS6)

2) You can use the Facebook SDK both on iOS5 and iOS6 (latest version for iOS at the time i write this answer is 3.5). The Facebook SDK already takes care of using the user's Facebook account on iOS6 or relying on the Facebook app on iOS5 or iOS6 when the account is not already configured in the phone

Thank you. So I'm going to have to use the Twitter.framework for iOS 5 (& optionally 6) and the FB SDK 3.5 for iOS 5 (& optionally 6) and then the Social.framework for FB and Twitter in iOS 6. Looks like I can do this using just two frameworks!! Is the Twitter.framework already in the the SDK or am I going to have to download it like the FB SDK?

Sorry, being an idiot, I know it's included in the iOS SDK.

If i had to choose, i would probably use the Facebook SDK as the only way to share on Facebook (no point imho in using Social.framework if you still have to support iOS5). For Twitter i would probably use only the Twitter.framework on both iOS5 & iOS6 until i am ok to change my deployment target to iOS6+. In that case, i would switch to the Social.framework completely.

Perfect, exactly what I was thinking, thank you very much!

iphone - Simple posts to Facebook and Twitter iOS 5 & 6 - Stack Overfl...

iphone ios objective-c facebook twitter
Rectangle 27 5

If you are bound not to use FB / Twitter SDK . then you can try using activity controller and share from your app . Here you will get every possible share option .

var activityViewController:UIActivityViewController?
 textField .text = "Some Test"

 @IBAction func shareText(sender: UIButton) {
    let activityViewController = UIActivityViewController(
      activityItems: [textField.text as NSString],
      applicationActivities: nil)

    presentViewController(activityViewController, animated: true, completion: nil)
}

ios - How to Share on Facebook and Twitter App in Swift 3 without SDK ...

ios facebook twitter swift3
Rectangle 27 109

First of all: I'm the author of the The Single Page Interface Manifesto cited by raganwald

As raganwald has explained very well, the most important aspect of the Single Page Interface (SPI) approach used in FaceBook and Twitter is the use of hash # in URLs

The character ! is added only for Google purposes, this notation is a Google "standard" for crawling web sites intensive on AJAX (in the extreme Single Page Interface web sites). When Google's crawler finds an URL with #! it knows that an alternative conventional URL exists providing the same page "state" but in this case on load time.

In spite of #! combination is very interesting for SEO, is only supported by Google (as far I know), with some JavaScript tricks you can build SPI web sites SEO compatible for any web crawler (Yahoo, Bing...).

The SPI Manifesto and demos do not use Google's format of ! in hashes, this notation could be easily added and SPI crawling could be even easier (UPDATE: now ! notation is used and remains compatible with other search engines).

Take a look to this tutorial, is an example of a simple ItsNat SPI site but you can pick some ideas for other frameworks, this example is SEO compatible for any web crawler.

The hard problem is to generate any (or selected) "AJAX page state" as plain HTML for SEO, in ItsNat is very easy and automatic, the same site is in the same time SPI or page based for SEO (or when JavaScript is disabled for accessibility). With other web frameworks you can ever follow the double site approach, one site is SPI based and another page based for SEO, for instance Twitter uses this "double site" technique.

What about progressive enhancement principle? Website shouldn't crash of fail due to disabled JavaScript. And trust me, javascript is disabled not just in outdated browsers but also by many security aware users who do not like executing random JS.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 109

First of all: I'm the author of the The Single Page Interface Manifesto cited by raganwald

As raganwald has explained very well, the most important aspect of the Single Page Interface (SPI) approach used in FaceBook and Twitter is the use of hash # in URLs

The character ! is added only for Google purposes, this notation is a Google "standard" for crawling web sites intensive on AJAX (in the extreme Single Page Interface web sites). When Google's crawler finds an URL with #! it knows that an alternative conventional URL exists providing the same page "state" but in this case on load time.

In spite of #! combination is very interesting for SEO, is only supported by Google (as far I know), with some JavaScript tricks you can build SPI web sites SEO compatible for any web crawler (Yahoo, Bing...).

The SPI Manifesto and demos do not use Google's format of ! in hashes, this notation could be easily added and SPI crawling could be even easier (UPDATE: now ! notation is used and remains compatible with other search engines).

Take a look to this tutorial, is an example of a simple ItsNat SPI site but you can pick some ideas for other frameworks, this example is SEO compatible for any web crawler.

The hard problem is to generate any (or selected) "AJAX page state" as plain HTML for SEO, in ItsNat is very easy and automatic, the same site is in the same time SPI or page based for SEO (or when JavaScript is disabled for accessibility). With other web frameworks you can ever follow the double site approach, one site is SPI based and another page based for SEO, for instance Twitter uses this "double site" technique.

What about progressive enhancement principle? Website shouldn't crash of fail due to disabled JavaScript. And trust me, javascript is disabled not just in outdated browsers but also by many security aware users who do not like executing random JS.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang
Rectangle 27 109

First of all: I'm the author of the The Single Page Interface Manifesto cited by raganwald

As raganwald has explained very well, the most important aspect of the Single Page Interface (SPI) approach used in FaceBook and Twitter is the use of hash # in URLs

The character ! is added only for Google purposes, this notation is a Google "standard" for crawling web sites intensive on AJAX (in the extreme Single Page Interface web sites). When Google's crawler finds an URL with #! it knows that an alternative conventional URL exists providing the same page "state" but in this case on load time.

In spite of #! combination is very interesting for SEO, is only supported by Google (as far I know), with some JavaScript tricks you can build SPI web sites SEO compatible for any web crawler (Yahoo, Bing...).

The SPI Manifesto and demos do not use Google's format of ! in hashes, this notation could be easily added and SPI crawling could be even easier (UPDATE: now ! notation is used and remains compatible with other search engines).

Take a look to this tutorial, is an example of a simple ItsNat SPI site but you can pick some ideas for other frameworks, this example is SEO compatible for any web crawler.

The hard problem is to generate any (or selected) "AJAX page state" as plain HTML for SEO, in ItsNat is very easy and automatic, the same site is in the same time SPI or page based for SEO (or when JavaScript is disabled for accessibility). With other web frameworks you can ever follow the double site approach, one site is SPI based and another page based for SEO, for instance Twitter uses this "double site" technique.

What about progressive enhancement principle? Website shouldn't crash of fail due to disabled JavaScript. And trust me, javascript is disabled not just in outdated browsers but also by many security aware users who do not like executing random JS.

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?...

facebook url twitter fragment-identifier hashbang