adding titles and summaries to social media share links

I added parameters into the links instead of using Open Graph tags (og tags) as discussed with Dak. OG tags give us more control over what displays when shared, especially in Twitter. But, this is still a big improvement over what we have now.
I am not using sharer.php, which does not need an app id. Feed dialog needs
an app id.

https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.1

On Wed, Oct 1, 2014 at 9:43 AM, Derek Kent <notifications@github.com> wrote:

> In src/scripts/helpers/backbone/views/base.coffee:
>
> > @@ -102,6 +102,28 @@ define (require) ->
> >          canonicalUrl = "<link rel=\"canonical\" href=\"//#{location.hostname}/contents/#{parentId}/\" />"
> >          $('head').append(canonicalUrl)
> >
> > +
> > +    socialMediaInfo: () ->
> > +      share =
> > +        url: window.location.href
> > +        source:'OpenStax CNX'
> > +        via:'cnxorg'
> > +        summary:$('.summary').text() or 'An OpenStax College book.'
> > +        title: document.title
> > +        image: location.origin + "/images/logo.png"
> > +        # App ids ARE required for Facebook.
>
> I just tried the following link without an App ID and it seemed to work
> fine:
>
> https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fcnx.org&media=http%3A%2F%2Fcnx.org%2Flogo.png&description=CNX
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Connexions/webview/pull/699/files#r18282769>.
>