how do i ger the Autorization code from linkedin API - linkedin

how do i get the Authentication code, i am using below link to get this
"https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=" + apiKey + "&redirect_uri=" + REDIRECT_URL + "&state=" + STATE + "&scope=w_share";
but it keep asking me to click on Allow button, is there any way i can automate this programatically.
Thank you.

You can't do it.
If you could do it automatically without user interaction, it would mean that your application can manipulate the user's data freely without getting approval from the user.

Related

How to send ElectroNeek RPA bot output to Telegram

I have made a ElectroNeek RPA bot that scouts the web for a particular piece of data and then I wish to send it to my Telegram. Any ideas?
Let's break up the task in two parts.
First, in order to send anything to yourself at telegram you would need to create a telegram bot and find out your telegram ID. A good tutorial on that is here. Not all of it is necessary. Read from the beginning to the words "Every Update object consists of Message objects." (You would need some basic python skills to implement this).
After you are done, you would have two numbers:
bot_token = 'XXXXXXXXXX:AAGs7Rapl-NW00ZoQMs6AP6BfhqvlXXXxXX'
bot_chatID = 'XXXXXXXXX'
Second, you would need to create the HTTP request action in your ElectroNeek flow like so:
The URL property should be a string that is comprised of variables obtained in step one, telegram URL and your message, like so:
'https://api.telegram.org/bot' + bot_token + '/sendMessage?chat_id=' + bot_chatID + '&text=' + your_variable
where "your_variable" is the variable you would like to send yourself on Telegram.

HTTP Post: getting encrypted Paypal multiple-item cart upload button

I am having trouble using the BMCreateButton of the Button Manager API to get a multiple-item cart uploaded.
Inside the paypal documentation for the cart upload command, the paragraph on "securing your button" implies that it should be possible to get encrypted buttons for all the functions listed above, including the cart upload form. And in this SO thread, someone states they have solved this with PHP, but having looked it up, it's not evident they use a simple HTTP Post, as it's got to do with a PHP class's internal workings.
So far, I am able to only view one item only, and when trying to use the multiple-item syntax (item_name_1, item_name_2...) it's showing no items at all with a total of 0.00.
Here is my request code:
string requestContent =
"METHOD=BMCreateButton" +
"&VERSION=85.0" +
"&USER=<user>" +
"&PWD=<pwd>" +
"&SIGNATURE=<sig>" +
"&BUTTONCODE=ENCRYPTED" +
"&BUTTONTYPE=BUYNOW" +
"&BUTTONIMAGE=reg" +
"&BUTTONCOUNTRY=US" +
"&BUTTONSUBTYPE=PRODUCTS" +
//"&L_BUTTONVAR1=cmd%3D_cart" + //having this in here definitely causes an error message to display
"&L_BUTTONVAR1=button_subtype%3DPRODUCTS" +
"&L_BUTTONVAR2=business%3Dbiz%40biz.com" +
"&L_BUTTONVAR3=item_name_1%3DToaster" +
"&L_BUTTONVAR4=amount_1%3D45.00" +
"&L_BUTTONVAR5=quantity_1%3D1" +
"&L_BUTTONVAR6=upload%3D1";
It doesn't work -I have asked the PayPal tech support and will post back here if I hear anything back from them on this topic.
I encountered the same issue and as there was no progress, I contacted PayPal support. There is the answer:
There is quoted reply in case the link will die:
It's not only with ENCRYPTED. If you try CLEARTEXT, the same error is thrown.
Upload cart is a slightly different kind of button, that was never intended to be pre-built, and that's why this functionality doesn't exist in BMCreateButton. If you compare the Button Manager in the account and the API functionality - they have the same capabilities and, in both cases, the upload cart isn't there.
Looking at the documentation, you will also notice the BUTTONTYPE=CART refers to Add to cart.
It makes perfect sense to try to secure the upload cart code, but the best way will always be post-transaction consistency verification (with IPN).
So to sum this up, it is not possible to encrypt it, we can only detect tampering, e.g., with IPN.
In the reaction to my question, the PayPal moderator filed an issue to clarify this in the documentation.

How to Tweet using Oauth in asp.net?

I want to develop a feature in my project where I should be able to tweet to twitter using oauth.
I had tried using direct tweeting method as follows:
https://twitter.com/intent/tweet?text=' + text + "&url=" + encodeURIComponent("myurl");
but this requires login on each tweet.
Can anyone help me out………….

How to get all users from aweber list in asp.net?

I am developing web application (using VS2010 and asp.net,c#) that gets all aweber users list. I am using following code to achieve it.
i am using this useful document. as per this document i did following things..
created account in aweber labs https://labs.aweber.com/
created "test" app
Use the "consumerKey" and "consumerSecret" code which is given by aweber team.
used following code
String consumerKey = "Afdgdfgdgfgdfll";
String consumerSecret = "zDKexfgdfgdfQqlKh5KD";
API api = new API(consumerKey, consumerSecret);
api.CallbackUrl = "http://" + Request.Url.Host + ":" + Request.Url.Port + "/Authorize.aspx";
api.get_request_token();
HttpContext.Current.Session.Add("oauth_token", api.OAuthToken);
HttpContext.Current.Session.Add("oauth_token_secret", api.OAuthTokenSecret);
api.authorize();
i am getting null value "OAuthToken". If any solution then let me guide.
Thanks in advance. !!
Check out http://aweber.codeplex.com/
This will save you a lot of work.

hide google analytic code

Is it possible not to show the google analytic code on the master page? I mean can I place it somewhere where no one can see it but still get all the analysis on the application ?
You can use the mobile code for google analytic to make what you ask.
http://code.google.com/mobile/analytics/docs/web/
How this works. This google modile code can call the google analytic from your server on code behind, and not from the client page using javascript. So you can totally hide this call from your clients, and all data are send to google analytic, let say on page load.
First on your google analytic detail page, get the code for mobiles for asp.net, and then see this code that you need to focus and change, so you can make a global function that use on Page Load. To avoid possible delay I also suggest to make a new thread call to the google analytics, until the asp.net 4.5 get outs that include that option on WebRequest.
string utmGifLocation = "http://www.google-analytics.com/__utm.gif";
// Construct the gif hit url.
string utmUrl = utmGifLocation + "?" +
"utmwv=" + Version +
"&utmn=" + GetRandomNumber() +
"&utmhn=" + HttpUtility.UrlEncode(domainName) +
"&utmr=" + HttpUtility.UrlEncode(documentReferer) +
"&utmp=" + HttpUtility.UrlEncode(documentPath) +
"&utmac=" + account +
"&utmcc=__utma%3D999.999.999.999.999.1%3B" +
"&utmvid=" + visitorId +
"&utmip=" + GetIP(GlobalContext.Request.ServerVariables["REMOTE_ADDR"]);
SendRequestToGoogleAnalytics(utmUrl);
private void SendRequestToGoogleAnalytics(string utmUrl)
{
try
{
WebRequest connection = WebRequest.Create(utmUrl);
((HttpWebRequest)connection).UserAgent = GlobalContext.Request.UserAgent;
connection.Headers.Add("Accepts-Language",
GlobalContext.Request.Headers.Get("Accepts-Language"));
using (WebResponse resp = connection.GetResponse())
{
// Ignore response
}
}
catch (Exception ex)
{
if (GlobalContext.Request.QueryString.Get("utmdebug") != null)
{
throw new Exception("Error contacting Google Analytics", ex);
}
}
}
All that is a little hack on google analytic mobile code, but the general idea works on your case. Get the Google Analytic SDK here.
http://code.google.com/apis/analytics/docs/tracking/home.html
What actually google try to archive here. Google say that there is not reason for mobile phone with limited and costly bandwidth to make the call on google analytics. So google make a code behind call to google analytic just by opening a page. From the part of the mobile, he only need to read a tiny image, and on code behind this call to the image is making the reall call to google. From your side, you do not need to place an image, you can direct call google analytic by changing a little the function that google provides.
Hope this help.
since you have to put it in your header for the analytic script, there is no easy way of doing this. you want to hide your ID#? There may be a way to reference a variable for your ID#, but without a bunch of extra coding there is no way.
If it's there, people can see it if they look for it. If it's not there, you can't get the analysis.
You could get a little sneaky, and have the analytics on a page that gets loaded into an invisible iframe, but someone that wants to find it will.

Resources