1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I don't know where to put this. Programming Problem PHP, MYSQL

Discussion in 'PHP & Perl' started by KatsuragiKeima, Dec 8, 2013.

  1. KatsuragiKeima

    KatsuragiKeima Newbie

    Joined:
    Nov 30, 2013
    Messages:
    33
    Likes Received:
    3
    Occupation:
    Online Marketing(Newbie)
    Location:
    Philippines
    So ive been editing a Code and decided to make my own function in PHP and Mysql.

    I search around in google but i don't seem to get the right keyword for this problem(Sorry im noob at coding).

    I want to create an app id, app secret rotation for Facebook App.

    I want my app to use another App ID after a new session or new visit of User.

    anyway of doing it?
     
  2. youtalkmedia

    youtalkmedia Senior Member

    Joined:
    Dec 5, 2011
    Messages:
    830
    Likes Received:
    375
    Occupation:
    Web Developer
    Location:
    Toronto
    Home Page:
    sorry, you need to be more clear with what you want to happen.

    Do you have a database of app id's and you want to rotate through them?

    Are you trying to create and store an app id?

    Are you calling a session based on a page view, or the entire time someone is on a website before the browser is closed, or by login?
     
    • Thanks Thanks x 2
  3. KatsuragiKeima

    KatsuragiKeima Newbie

    Joined:
    Nov 30, 2013
    Messages:
    33
    Likes Received:
    3
    Occupation:
    Online Marketing(Newbie)
    Location:
    Philippines
    Ahmm.. if possible i want to store the app id and the app secret together in Database Mysql so i can just pull them.

    i think i want the session before the browser is closed. but page views will work too.

    Sorry For my Bad English Mr. youtalkmedia, English is not my Primary Language.
     
  4. tnhomestead

    tnhomestead Regular Member

    Joined:
    Oct 9, 2011
    Messages:
    385
    Likes Received:
    253
    Location:
    Tenneessee USA
    Home Page:
    Its been a bit since my last app in Facebook, but isnt the app id generated by Facebook? You can share an app id across applications, as in a paid and free version by using a suffix. But as far as I know you cant use multiple app ids for 1 application.
     
  5. WizGizmo

    WizGizmo Super Moderator Staff Member Premium Member

    Joined:
    Mar 28, 2008
    Messages:
    3,833
    Likes Received:
    55,431
    Thread moved to the PHP & Perl section.

    "Wiz"
     
    • Thanks Thanks x 1
  6. KatsuragiKeima

    KatsuragiKeima Newbie

    Joined:
    Nov 30, 2013
    Messages:
    33
    Likes Received:
    3
    Occupation:
    Online Marketing(Newbie)
    Location:
    Philippines
    Nope, i seen an app using app rotation.

    it is only a website application and it can use multiple app id.
     
  7. youtalkmedia

    youtalkmedia Senior Member

    Joined:
    Dec 5, 2011
    Messages:
    830
    Likes Received:
    375
    Occupation:
    Web Developer
    Location:
    Toronto
    Home Page:
    OK so what you need to do is first create a SQL table for your app ids and your app secret codes.

    Make a table with 3 fields.

    ID int primary key auto increment
    appid var char(20)
    appsecret varchar(20)

    once this is some populate the table using the app ids and secret ids that you have.

    Next go to your website and use a SQL code that does
    Select * FROM tablename ORDER BY rand() LIMIT 1;
    this will randomly pick one row from your database. (containing the secret id and appid)

    use this infor on your page as needed.

    That is really the best I can do for free... I would be able to code everything you need but it would take to long for free.. you should be able to find some tuts on YouTube using the logic above.
     
    • Thanks Thanks x 1
  8. barigain

    barigain Junior Member

    Joined:
    Aug 23, 2012
    Messages:
    100
    Likes Received:
    12
    you can't create new Apps for every user.
    You should use one application, accept new users and generate unique tokens to access users (friends, photos etc)
     
  9. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    708
    Likes Received:
    267
    Location:
    PHP Scripting ;)
    You can, if you want. The user would have to accept the apps and grant permissions everytime then. Thats all.