Skip to content

Instantly share code, notes, and snippets.

@nov
Created April 15, 2011 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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
@sardaukar
Copy link

I'm using installed => false, but even when I change to true I still get "(#100) Invalid value specified for param: id"

@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