Monthly subscription and no ads

2 views
Skip to first unread message

Nathan

unread,
Jun 10, 2009, 2:53:27 AM6/10/09
to Tipjoy Developers
Hello

I was wondering if it would be possible (in the current state of the
API) to use it in order to allow people to buy a subscription to my
website for a period of time (i.e. 30 days). So a subscriber will get
in return ad-free website.

Like on DeviantArt, user could click a button "get rid of ads", he
would pay $1 via TipJoy and for 30 days he won't see ads. Ads would be
placed between something like "if" functions (if (tipjoy_payment ==
true && time_since_payment < 30 days) return true;).

Honestly, I'm not really sure if this is even possible, and if so -
how can I do this. From what I understand, API operates on python, but
I'm not familiar with this language in anyway, and I wanted to merge
this subscription with WordPress blog and PHP.

What do you think?

Bruce Lewis

unread,
Jun 10, 2009, 6:53:49 AM6/10/09
to tipjoy-d...@googlegroups.com
PHP or any server-side language that can parse JSON can work.  What you're talking about is possible.

OurDoings (not PHP) has a similar scheme, except the tip makes a section of the site ad-free for everybody, not just the payer.  See http://ourdoings.com/2009-04-14

Nathan

unread,
Jun 10, 2009, 8:41:11 AM6/10/09
to Tipjoy Developers
OK, so it is possible. How, I have no idea, I don't even know where to
start. Maybe someone could point me to a downloadable script with
parsing functions, js and php (if there is anything like this). I was
never able to learn from pure theory, I always needed a practical
script to learn upon.

On Jun 10, 12:53 pm, Bruce Lewis <ourdoi...@gmail.com> wrote:
> PHP or any server-side language that can parse JSON can work.  What you're
> talking about is possible.
>
> OurDoings (not PHP) has a similar scheme, except the tip makes a section of
> the site ad-free for everybody, not just the payer.  Seehttp://ourdoings.com/2009-04-14

Ivan Kirigin

unread,
Jun 10, 2009, 9:48:02 AM6/10/09
to tipjoy-d...@googlegroups.com
I have an example from a test I run to make sure it works. The
"client" here is for hitting our API internally, but is equivalent to
something like urllib.

Here is creating an account with an OAuth header:
twitter_oauth_header =
twitter.export_oauth_credentials__3rd_party_oauth(p['oauth_token'],
p['oauth_token_secret'], consumer_key, consumer_secret)
response = client.post( '/api/createTwitterAccount/',
{'twitter_username':twitter_username,
'twitter_oauth_header':twitter_oauth_header,
'user_agent':'some_test_app'} )

def export_oauth_credentials__3rd_party_oauth( oauth_token,
oauth_token_secret, _twitter_consumer_key, _twitter_consumer_secret ):
url = 'http://twitter.com/account/verify_credentials.json'
consumer = {'oauth_token': _twitter_consumer_key,
'oauth_token_secret': _twitter_consumer_secret}
token = {'oauth_token': oauth_token, 'oauth_token_secret':
oauth_token_secret }
oauth_request = OAuthRequest( url )
oauth_request.sign_request(OAuthSignatureMethod_HMAC_SHA1,
consumer, token=token)
page_request = urllib2.Request( url, headers={'Authorization' :
oauth_request.to_header()} )
return page_request.headers['Authorization']

I feel like I've posted this code on this list before. I clearly
should just make my tests public, so people can see what I'm doing to
make sure it works.

Also, check this out:
http://tipjoy.com/api/#authentication

The last app I built was tatatweet, which used passwords. The next one
will be closed source, much more expensive to use, and will utilize
OAuth. I hope to launch it within, say, 5 weeks.

Ivan
http://tipjoy.com
Reply all
Reply to author
Forward
0 new messages