tmort / Socialite

Other
1.68k stars 163 forks source link

Quora Follow Button #24

Open dbushell opened 12 years ago

dbushell commented 12 years ago

Implementing the Quora Follow Button in Socialite may be tricky.

The normal embed code looks like this:

<span class="quora-follow-button" data-name="David-Bushell">
    Follow <a href="http://www.quora.com/David-Bushell">David Bushell</a> on <a href="http://www.quora.com">Quora</a>
    <script type="text/javascript" src="http://www.quora.com/widgets/follow?embed_code=MikiaY7"></script>
</span>

This is awful (edit: that's a bit harsh! I mean "not ideal") for three reasons:

All the script does is create an iframe. There is no API exposed to activate new instances. Socialite could very easily create the iframe itself but since none of this is documented we can't rely on the implementation remaining the same in future (the way we can with Facebook's documented iframe).

Socialite assumes each network (or group of widgets) requires one script element for all instances (the sensible way every other network works I've encountered). From what I can see we'll have to bypass this for Quora else it'll require a lot of changes in the core.