Example #1
0
	def render_GET(self, req):
		self.req = req
		
		access_token = req.args.get("access_token", None)
		local_url = str(req.prePathURL())
		
		if access_token is None:
			red = 'http://www.espend.de/fb.php?local=' + local_url
			auth_url = "https://www.facebook.com/dialog/oauth?client_id=440490789296919&scope=read_stream,read_friendlists,publish_stream,read_mailbox,friends_online_presence&redirect_uri=%s&response_type=token" % urllib.quote_plus(red)
			
			return redirectTo(auth_url, req)
		
		variable_set('access_token', str(self.GET('access_token')))
		variable_set('expires_on', str(int(self.GET('expires_in')) + time()))

		jsonp_callback = req.args.get("jsonp_callback", None)
		return str(jsonp_callback[0]) + '({"msg":"box ok"})';
Example #2
0
    def render_GET(self, req):
        self.req = req

        access_token = req.args.get("access_token", None)
        local_url = str(req.prePathURL())

        if access_token is None:
            red = 'http://www.espend.de/fb/?local=' + local_url
            auth_url = "https://www.facebook.com/dialog/oauth?client_id=440490789296919&scope=read_stream,read_friendlists,publish_stream,read_mailbox,friends_online_presence&redirect_uri=%s&response_type=token" % urllib.quote_plus(
                red)

            return redirectTo(auth_url, req)

        variable_set('access_token', str(self.GET('access_token')))
        variable_set('expires_on', str(int(self.GET('expires_in')) + time()))

        jsonp_callback = req.args.get("jsonp_callback", None)
        return str(jsonp_callback[0]) + '({"msg":"box ok"})'
Example #3
0
 def save(self, values):
     variable_set('external_curl', bool(values['external_curl']))
     return _('Settings saved')
 def save(self, values):
   variable_set('external_curl', bool(values['external_curl']))
   return _('Settings saved')