Skip to content

Instantly share code, notes, and snippets.

@nov
Created April 15, 2011 16:03
Show Gist options
  • Save nov/921947 to your computer and use it in GitHub Desktop.
Save nov/921947 to your computer and use it in GitHub Desktop.
Destroy Facebook Test User
app = FbGraph::Application.new(config[:client_id], :secret => config[:client_secret])
user = app.test_user!(:installed => true, :permissions => :read_stream)
user.destroy
@nov
Copy link
Author

nov commented Apr 18, 2011

Can you give me your whole code with which I can replicate your error?

@bettysteger
Copy link

i have two old users

example:

<FbGraph::TestUser:0x000001076e5bb0 @Identifier="499102699", @endpoint="https://graph.facebook.com/499102699", @access_token=nil,..

don't know why i can't destroy 'old' users

but when I create new ones with app.test_user! it is possible to destroy them

example new user:

<FbGraph::TestUser:0x00000106055120 @Identifier="100002494629341", @endpoint="https://graph.facebook.com/100002494629341", @access_token="213439622021302|7d200a351e228508e997bd80.0-100002494629341|-8j6vBIzmb-naxjqzvQxeko-LBo", ..

so i did the following to make sure to destroy all 'new' users

app.test_users.each do |u| 
  u.destroy if u.identifier.length > 10
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment