Facebook api('/me') not returning username [closed] - facebook

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I am trying to implement a login with Facebook - thus far all is working, apart from the $user data I am being returned does not include the username (which I know does exist).
The array I am being returned is the following (with details purged):
Array ( [id] => ################ [email] => #.##############.co.uk [first_name] => ######## [gender] => male [last_name] => ######## [link] => https://www.facebook.com/app_scoped_user_id/################/ [locale] => en_GB [name] => ######## ######## [timezone] => 1 [updated_time] => 2014-05-06T21:23:33+0000 [verified] => 1 )
Has anyone had experience of this before?

The username field was removed in version 2.0 of the graph API. I'm not aware of any workaround (short of using version 1.0).
This change is listed in the "Removed Endpoints" section of the upgrade guide. You can also see that the "User" reference contains no mention of a username field for version 2.0, but does for version 1.0.
Not all fields are available through the API. You can see exactly what fields are available using the references I've provided above.

Looks like a Facebook Graph API bug.

Related

How Do I Integrate Paypal, Gravity Forms And Wishlist?

First off, I'm by no means a programmer so this might be a very simple issue but I'm about to pull my hair out soon.
So, I have a site where I'm selling a book + access to a membership through Wishlist Member. It sells for $99 and now I want to give them a $9 trial for 30 days and then bill them the remaining $90 over 2 installments of $45 each with a month apart.
Now, integrating Wishlist with PP is easy to setup when I'm only sending people straight to PayPal.
It basically only requires 3 steps besides activating IPN and pasting in the PDT.
Add the item/subscription ID of my Wishlist Membership Level to the PayPal button I'm creating.
Make sure the thank you page URL after purchase is:
site.com/members/index.php/register/AOKmfa
Paste the code below in the "Add advanced variables" field:
rm=2
bn=WishListProducts_SP
notify_url=site.com/members/index.php/register/AOKmfa
return=site.com/members/index.php/register/AOKmfa
Now I'm looking to increase the sign up rate so I am creating my own order page with Gravity Forms Paypal-Add on.
In there you have an option to set the thank you page, so in my case I would add "site.com/members/index.php/register/AOKmfa" and then I can also tick a box that says:
"Pass Field Data Via Query String" where I'm apparently suppose to paste in the code:
rm=2
bn=WishListProducts_SP
notify_url=site.com/members/index.php/register/AOKmfa
return=site.com/members/index.php/register/AOKmfa
But, my question is... how can I get this subscription ID involved?!
After speaking to Gravity Form support they said:
To pass additional info to PayPal you can use gform_paypal_query filter. You adapt this code to suit your needs.
add_filter('gform_paypal_query', 'add_more_information', 10, 3);
function add_more_information($query_string, $form, $entry) {
// break the query string into an array
// after removing the initial '&' character
parse_str(ltrim($query_string, '&'), $query);
// add information to query string. These currently exist
/*
[METHOD]
[VERSION]
[PWD]
[USER]
[SIGNATURE]
[BUTTONSOURCE]
[CREDITCARDTYPE]
[ACCT]
[EXPDATE]
[CVV2]
[STREET]
[STREET2]
[CITY]
[STATE]
[ZIP]
[COUNTRYCODE]
[CURRENCYCODE]
[FIRSTNAME]
[LASTNAME]
[EMAIL]
[DESC]
[L_NAME0]
[L_DESC0]
[L_AMT0]
[L_NUMBER0]
[L_QTY0]
[PAYMENTACTION]
[IPADDRESS]
[RETURNFMFDETAILS]
[AMT]
[NOTIFYURL]
*/
// change SHIPTONAME to whatever query string parameter you want to set
// and change the inputs here to whatever field holds your item title.
$query['L_DESC0'] = rgpost("input_6_13");
// put it all back together again
$query_string = '&' . http_build_query($query);
return $query_string;
}
So my question is, how can I adapt that code to actually get this integration to work? They are clearly not interested in pinpointing exactly how I would go about doing it so maybe one of you can?
Do I only need to adapt the code so it somehow adds in that subscription ID? (If so, how?) Or do I also need to add in the redirect url and the advanced variable field?
I truly appreciate any kind of help you can give me and if this should be posted elsewhere please let me know.
Thanks,
Tony

PayPal Sandbox Multi-Currency MYR [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I would like to ask if the following scenario is possible in Paypal Sandbox.
My Store currency is MYR.
Sample: MYR 187.45
My Business account has USD as primary currency. And in My Payment Receiving Preferences
Allow payments sent to me in a currency I do not hold. and I selected:
Yes, accept and convert them to U.S. Dollars. Additional charges apply.
When I click Buy now, I always got an error:
SetExpressCheckout failed: Array ( [TIMESTAMP] => 2014%2d06%2d19T06%3a13%3a28Z [CORRELATIONID] => ece5b15d66df6 [ACK] => Failure [VERSION] => 72%2e0 [BUILD] => 11457922 [L_ERRORCODE0] => 10605 [L_SHORTMESSAGE0] => Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e [L_LONGMESSAGE0] => Currency%20is%20not%20supported [L_SEVERITYCODE0] => Error )
Having a hard time on this, Please help me . thank you very much!
According to the PayPal Currency Documentation Malaysian Ringgit (only for Malaysian members) MYR.
You can use the above link to assist you with your currency choices since it comes directly from the PayPal published currency list.

Need help using Net::SSH::Expect module to provide password / yes/ no interaction [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Ok what i am looking for here is to do the following.
Login in to the remote server.
Execute a few cmds.
Interaction such as yes/no to generate keys.
CPAN Documentation is a Good Resource
As I discussed with you earlier in perl chat, this module is well documented on CPAN. Using some of the examples from there...
To configure Net::SSH::Expect for your server:
my $ssh = Net::SSH::Expect->new (
host => "myserver.com",
password=> 'pass87word',
user => 'bnegrao',
raw_pty => 1
);
To log in using password:
my $login_output = $ssh->login();
if ($login_output !~ /Welcome/) {
die "Login has failed. Login output was $login_output";
}
To run commands:
my $ls = $ssh->exec("ls -l /");
print($ls);
my $who = $ssh->exec("who");
print ($who);
To close connection:
$ssh->close();
You should really ask if you have more specific questions, as just asking for examples isn't really going to help you in accomplishing your task. The documentation is also very complete, so you should check there.

Register new memer for vBulletin via Mobile API

I'm trying to use the vBulletin REST Mobile API to simply register.
The sourced are installed on my local machine and according the documentation https://www.vbulletin.com/forum/content.php/393-User-Registration-Process-Mobile-API
This procedure should not be so hard, especially without humanity and COPPA authentication.
However I've stacked!
The method definition describes "addnewmember" clear, so I've generated a test link, which should do the job.
https://www.vbulletin.com/forum/content.php/365-User-Related-Methods
The link is:
.../forum/api.php?&api_m=register_addmember&api_c=1&api_s=76ec9eec61e7fdfef2f3feee28d5f392&api_sig=8fe54313b333cc0fef4ddd8e398b5c80&api_v=6&agree=1&username=testuser&email=XXXXXX%40gmail.com&emailconfirm=XXXXX%40gmail.com&password=12345678&passwordconfirm=12345678
As a response I get: register_not_agreed
The Docs: register_not_agreed
The agree parameter should be set to 1.
Which is also clear - agree parameter was not there.
Here comes the funny part - In the API-Log I can see that the 'agree' parameter is correctly passed
*1 test_client Gast 13:23, 18.06.2012 register_addmember Array ( [api_m] => register_addmember [api_c] => 1 [api_s] => 76ec9eec61e7fdfef2f3feee28d5f392 [api_sig] => 8fe54313b333cc0fef4ddd8e398b5c80 [api_v] => 6 [agree] => 1 [username] => testuser [email] => ....*
Is there anybody with experience with the Mobile API that could help?
I don't know why it does not work with a pure GET call but I'm sure it will work (because I'm working on a vBulletin API client in Python and I did it this way) if you:
use GET parameters to send api_c, api_sm, api_m, and api_sig
use POST data for all the rest (username, email, agree, etc)

Twitter4J - 401:Authentication credentials were missing or incorrect [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I'm playing around with the Twitter4J API and am getting the 401:Authentication credentials were missing or incorrect when using the createFriendship method.
I obtain an instance of Twitter as follows:
protected Twitter getApi(String consumerKey, String consumerSecret, String accessToken, String secret) {
AccessToken token = new AccessToken(accessToken, secret);
return new TwitterFactory().getOAuthAuthorizedInstance(consumerKey, consumerSecret, token);
}
Once obtained I can successfully use the updateStatus method to tweet something. However when I try to execute the createFriendship method I get the following error even though the status updates are working fine
Request processing failed; nested
exception is 401:Authentication
credentials were missing or incorrect.
{"request":"\/1\/friendships\/create.json?screen_name=[user]","error":"Incorrect
signature"}
TwitterException{exceptionCode=[564a75a9-01c7e75c],
statusCode=401, retryAfter=0,
rateLimitStatus=null, version=2.1.5}
In the above error the screen_name=[user] the [user] section is replaced with the correct Twitter screen name.
Is there something I am missing?
Thank you
Sorry it was a simple problem with 2 different versions of Twitter4J on the classpath!