I made a quick and dirty twitter share button and thought it worked great, until I happened to try to share a page from a multi-page post. The url reported by the_permalink is always the first page of any multi-page post, it ignores all of the pages after the <!--nextpage-->.
<a href="https://twitter.com/intent/tweet?url=<?php urlencode(the_permalink());?>&text=<?php the_title(''); ?>" target="_blank"><img src="/images/twitter-share.jpg" alt="Tweet This" width="59" height="59"/></a>
etc all return example.com/random-page in the button, the page number doesn't appear. I noticed the same thing happens to the open graph url data for this site so do I have a problem with my site or is the page number simply not added on nextpage posts via the_permalink?