Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How do you just get a shortened link from PHP?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bob S  
View profile  
 More options Jul 24 2012, 7:28 pm
From: Bob S <bsabis...@gmail.com>
Date: Tue, 24 Jul 2012 16:28:26 -0700 (PDT)
Local: Tues, Jul 24 2012 7:28 pm
Subject: How do you just get a shortened link from PHP?

Hello,

  I've tried following several examples from the web of how to get a
shortened URL using bit.ly and PHP, like so:

            $api_call =
file_get_contents("http://api.bitly.com/v3/shorten?login=".BIT_USER."&apiKey=".BIT_API."&longUrl=".$url);

Apparently this doesn't work anymore?  I get error 500 invalid login.  Is
there a simple example somewhere of how to do it now?  I tried to follow
the OAuth API documentation but don't know if I need to.   It set my head
spinning compared to the above.  Any comparable examples to the above?

Thanks
Bob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt LeMay  
View profile  
 More options Jul 25 2012, 2:37 pm
From: Matt LeMay <m...@bit.ly>
Date: Wed, 25 Jul 2012 14:37:48 -0400
Local: Wed, Jul 25 2012 2:37 pm
Subject: Re: [bitly-api] How do you just get a shortened link from PHP?

Hi, Bob-

The above example should still work, yes. Can you verify once that you're
using the exact login and API key values shown at
http://bitly.com/a/your_api_key? We'll work on making the documentation
clearer for endpoints that still support API key authentication, sorry for
the confusion.

Thanks, and all the best,
Matt
On Jul 25, 2012 2:23 PM, "Bob S" <bsabis...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob S  
View profile  
 More options Jul 27 2012, 2:19 pm
From: Bob S <bsabis...@gmail.com>
Date: Fri, 27 Jul 2012 11:19:04 -0700 (PDT)
Local: Fri, Jul 27 2012 2:19 pm
Subject: Re: [bitly-api] How do you just get a shortened link from PHP?

When I go to that link, I see the correct API key, but it says my user name
is 'o_7h2i2h3nat'.

It should be 'voxelapp'.  What am I doing wrong?

Thanks
Bob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt LeMay  
View profile  
 More options Jul 27 2012, 2:40 pm
From: Matt LeMay <m...@bitly.com>
Date: Fri, 27 Jul 2012 14:40:31 -0400
Local: Fri, Jul 27 2012 2:40 pm
Subject: Re: [bitly-api] How do you just get a shortened link from PHP?

Hi, Bob-

The 'o_7h2i2h3nat' value is actually the one you should use to call the
API; it is an opaque, unique identifier that is generated when you create
an account via Facebook or Twitter. "@voxelapp" is your display name, which
you should see consistently in the bitly visual interface.

We're going to update the dev site next week to make this clearer; you
aren't doing anything wrong!

Thanks, and all the best,
Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob S  
View profile  
 More options Jul 27 2012, 3:13 pm
From: Bob S <bsabis...@gmail.com>
Date: Fri, 27 Jul 2012 12:13:26 -0700 (PDT)
Local: Fri, Jul 27 2012 3:13 pm
Subject: Re: [bitly-api] How do you just get a shortened link from PHP?

OK -- but where did you get that link from?  In other words, how do I find
that name when I am logged into my account?  I don't see it anywhere, and I
would not have known about
 http://bitly.com/a/your_api_key without posting a question here to these
groups.  

Thanks
Bob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt LeMay  
View profile  
 More options Jul 30 2012, 11:13 am
From: Matt LeMay <m...@bitly.com>
Date: Mon, 30 Jul 2012 11:13:27 -0400
Local: Mon, Jul 30 2012 11:13 am
Subject: Re: [bitly-api] How do you just get a shortened link from PHP?

Hi, Bob-

http://bitly.com/a/your_api_key was linked from the very bottom of the
"authentication" page, but it was way hard to find, and not directly linked
to from the /v3/shorten API endpoint documentation. We updated the
documentation this morning to make this clearer:

http://dev.bitly.com/links.html#v3_shorten

Thanks again for your feedback here, this was really helpful!

All the best,
Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »