I guess I didnt pass my point across well enough. Would it be possible if I 
could access the content of a form and call a function that would tweet the 
content of that form before inserting the content into a database? i.e. if 
form.accept(request.vars, session, onvalidation=tweet())
or something similar?

On Thursday, August 30, 2012 9:04:22 PM UTC+1, rochacbruno wrote:
>
> Without OAuth and permissions I only can see one way. 
>
> The twitter url for tweets is: 
>
> def tweet(): 
>     tweet_url = 
> "
> https://twitter.com/intent/tweet?original_referer=%(referer)s&related=%(related)s&source=%(source)s&text=%(text)s"
>  
>
>     form = SQLFORM(db.tweets) 
>     if form.process().accepted: 
>         if form.vars.tweetthis: 
>             data = dict(referer="mysiteurl.com", 
>                             related="mytwittername", 
>                             source="myappname", 
>                             text=form.vars.tweet_text) 
>             redirect(tweet_url % data)  # here you can choose to use 
> Javascript and open in a popup (aditional logic needed) 
>     return dict(form=form) 
>
>
> On Thu, Aug 30, 2012 at 4:17 PM, Pystar <aitoe...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I have a form that includes a "tweet this" select box option. I would 
> like to tweet the contents of the textarea which is the only form field and 
> at the same time submit the form to a database. I am at a loss on how to 
> develop this. Is it possible with web2py. Considering the fact that I am 
> only using the inbuilt auth for user authentication. 
> > 
> > -- 
> > 
> > 
> > 
>

-- 



Reply via email to