ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a URL(A) that redirects me to another URL(B). This URL(B) will redirect me to the final URL(C) and has an access code inside of the address bar. So a total of 3 redirects.
I can get the second URL(B), the redirect URL(B), but in order to obtain the 3rd redirect URL(C), I need to use the system call and open the URL(B) in the browser which redirects me to the third URL(C) which has the access code i need.
I need to get the access code with inside the address bar URL(C) without opening a browser tab. How can I accomplish this?
Also, consider your overall approach. Facebook has a programmatic API that is intended for "program-to-program" activities, vs. those which rely upon a heavily JavaScript-driven browser. And, Perl has CPAN modules to interface with it (see http://search.cpan.org.
Yes indeed, FB does query your browser-type and will not go far if it doesn't recognize what your LWP instance claims to be. However, also note that FB "will not go far," in general, without resorting to JavaScript ... which is much more difficult to programmatically emulate. They're a pretty busy bunch of coders, constantly fiddling with their system's guts even when the external UI doesn't change visibly. Build your code with flexibility in mind, and put it under source-code control (such as "git") so that you can change it easily when they do.
Last edited by sundialsvcs; 12-03-2013 at 07:04 AM.
OK. I just figure there are so many intelligent and talente members here, yo never know what someone might be knowlegable about! I guess perlmonks wold be better suited though huh?
Quote:
Originally Posted by sundialsvcs
Also, consider your overall approach. Facebook has a programmatic API that is intended for "program-to-program" activities, vs. those which rely upon a heavily JavaScript-driven browser. And, Perl has CPAN modules to interface with it (see http://search.cpan.org.
I am using the Facebook Graph module made for Perl. That only goes so far. I have a program up and running. I already wrote a GUI, have the login, OAuth, access token manipulation sub routines suited for the programs needs, etc. I am trying to fully automate my program. This browser redirect is the last step but i think NevemTeve, has the right idea!
Yes indeed, FB does query your browser-type and will not go far if it doesn't recognize what your LWP instance claims to be. However, also note that FB "will not go far," in general, without resorting to JavaScript ... which is much more difficult to programmatically emulate. They're a pretty busy bunch of coders, constantly fiddling with their system's guts even when the external UI doesn't change visibly. Build your code with flexibility in mind, and put it under source-code control (such as "git") so that you can change it easily when they do.
I could use the selenium module if i wanted to use/interface with JS while using Perl.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.