Beispiel #1
0
def ajax_like_operate():
    task_detail = dict()
    task_detail['xnr_user_no'] = request.args.get('xnr_user_no','')
    task_detail['r_tid'] = request.args.get('tid','') # 被转发帖子
   
    #task_detail['r_uid'] = request.args.get('uid','') # 被转发帖子的用户
    
    task_detail['r_uid'] = request.args.get('uid','') # 被转发帖子的用户
    print '==================-------------------------===================='
    print task_detail['r_tid'], task_detail['r_uid']
    task_detail['timestamp'] = int(request.args.get('timestamp',''))
    mark_s = save_oprate_like(task_detail)    

    # mark = get_like_operate(task_detail)


    queue_dict = {}
    queue_dict['channel'] = 'twitter'
    queue_dict['operate_type'] = 'like'
    queue_dict['content'] = task_detail
    mark_a = add_operate2redis(queue_dict) 
    # print mark_a
    mark = mark_a and mark_s   
    
    return json.dumps(mark)
Beispiel #2
0
def ajax_like_operate():
    task_detail = dict()
    task_detail['xnr_user_no'] = request.args.get('xnr_user_no', '')
    task_detail['mid'] = request.args.get('mid', '')

    #mark = get_like_operate(task_detail)
    task_detail['timestamp'] = int(request.args.get('timestamp', ''))
    mark_s = save_oprate_like(task_detail)

    queue_dict = {}
    queue_dict['channel'] = 'weibo'
    queue_dict['operate_type'] = 'like'
    queue_dict['content'] = task_detail
    mark_a = add_operate2redis(queue_dict)

    mark = mark_a and mark_s

    return json.dumps(mark)
Beispiel #3
0
def ajax_like_operate():
    task_detail = dict()
    task_detail['xnr_user_no'] = request.args.get('xnr_user_no', '')
    task_detail['r_fid'] = request.args.get('fid', '')  # 被转发帖子
    task_detail['r_uid'] = request.args.get('uid', '')  # 被转发帖子的用户

    task_detail['timestamp'] = int(request.args.get('timestamp', ''))
    mark_s = save_oprate_like(task_detail)

    queue_dict = {}
    queue_dict['channel'] = 'facebook'
    queue_dict['operate_type'] = 'like'
    queue_dict['content'] = task_detail
    mark_a = add_operate2redis(queue_dict)
    mark = mark_a and mark_s
    # mark = get_like_operate_fb(task_detail)

    return json.dumps(mark)