Indeed, I came to a dead end as far as imitating the front end. I got farther than I thought I would, though. I like that MathLink is transparent enough to at least give a glimpse of what is going on.
Another approach I thought to try was to override a function within Mathematica. For example, I tried this, using an access token than I had retrieved with my own code:
HTTPClient`OAuthAuthentication[consumerKey_,consumerSecret_,
authorizeEndpoint_,accessEndpoint_,redirectURI_,
oauthVersion_,accessTokenExtractor_]=
HTTPClient`OAuthToken[HTTPClient`OAuth`Private`OAuth20Parameters["graph.facebook.com",
None,Automatic,"verifier",Automatic,Automatic,"(my consumer key here)",
"(my consumer secret here)","https://www.facebook.com/dialog/oauth","RemoveWhitespace",
"https://graph.facebook.com/oauth/access_token","GET",
"https://www.facebook.com/connect/login_success.html","Text/2.0","None"],
HTTPClient`OAuth`Private`Token20["(my valid access token here)"]]
But then when I try this:
token = HTTPClient`OAuthAuthentication[
"ConsumerKey" -> "(my consumer key)",
"ConsumerSecret" -> "(my consumer secret)",
"AuthorizeEndpoint" -> "https://www.facebook.com/dialog/oauth",
"AccessEndpoint" -> "https://graph.facebook.com/oauth/access_token",
"RedirectURI" -> "https://www.facebook.com/connect/login_success.html",
"OAuthVersion" -> "2.0",
"AccessTokenExtractor" -> "Text/2.0"]
The regular oauth dialog pops up, as if the function had not been overridden. Have I done this incorrectly? Or is this function somehow locked? I tried using "unprotect" but that had no effect.
Also, this dialog looks different than the one that pops up when I use SocialMediaData, so I am not sure if SocialMediaData even uses this function. So, perhaps there is too much reverse engineering required altogether in this endeavor. But I thought I would give it a shot.