Slight hiccup ! #1

Closed
valuser opened this Issue Sep 10, 2012 · 17 comments

Projects

None yet

3 participants

@valuser

Many thanks for this plugin.

Created twitter application
Set Access level to Read & Write
Created Access Token

Inputed Access token into Twitter API Token
Inputed Access token secret into Twitter API Secret
Saved Changes

But still
No users found for the Twitter extension.

Then in Open Educational Resources---->Accounts---->Twitter ----->Start Authorisation -------> Failed to validate oauth signature and token

Obviously I'm doing something wrong as Boone says it works - so it must!!

also can linkedin and Facebook settings be far away !

@DaleMckeown DaleMckeown was assigned Sep 10, 2012
@DaleMckeown
LNCD Group member

Hi valuser,

Thanks for letting me know you are having an issue. Sorry for the slow reply, I have been at a conference all day and was not able to respond.

The "Failed to validate oauth signature and token" error - I presume you are getting this message on Twitter?

When directed to that page on twitter after clicking "Start Authentication", what parameters are in the URL? it should be something like:
https://api.twitter.com/oauth/authorize?oauth_token=MY_OAUTH_TOKEN.

Can you please cross check this value by going to whatever database monitoring tool you use, and open up the database you use for WordPress. Then navigate to the "wp_bp_bebop_user_meta" table. In there, there will be an access token held against your Wordpress user_id for Twitter. Check the value of "bebop_twitter_oauth_token_temp" corresponding to your personal WordPress user id. (usually 1 for admin etc ).

This value should be a random string of characters. If it is anything seemingly less random, such as "encoding 1.0", or it does not match the value of MY_OAUTH_TOKEN from the Twitter URL, then please delete the "bebop_twitter_oauth_token_temp" and "bebop_twitter_oauth_token_secret_temp" rows for the user from the table and try to verify the user again.

Please let me know if there was something like "encoding 1.0" or similar - this was a bug I thought I had got rid of 6 weeks ago. I hope it isn't back!

Also, please do not post your issue everywhere. Please post to either WordPress or Github (preferred), and i will pick it up as soon as I can.

In response to your requests for Facebook and LinkedIn integration - these sites are not part of the scope for this project.

However, We have decided to extend Bebop by creating a version which is not OER focussed. This will enable me (and hopefully many others) to develop extensions for platforms such as those you mentioned above which are focussed more on social networking rather than sharing OERs.

I will build this into Bebop version 1.1, which I will release as soon as possible (hopefully within the next two weeks). Facebook and LinkedIn integration will then be a possibility. For now, there are a couple of fundemental issues and changes which are more important that adding platforms.

Please let me know how you get on.

Thanks,

Dale

@valuser

OK. Absolutely Great News.

Will confine comments to here

Also please don't be under any pressure to reply to me. I am just testing ideas for a potential project though i am very very interested in this. Thrilled that it's proceeding.

In the meantime I did the following so it MAY obviate going into the database.

Authorisation DID proceed when I inputed:

Consumer key into Twitter API Token and
Consumer secret into Twitter API Secret
Saved Changes

admin is now in Twitter Users but Twitter Name is empty.

However I was not getting any imports from twitter with Wordpress cron

tried server cron
but inputing 0 or '0' into WordPress Cron time (in seconds): outputs / (a forward slash)

added the server cron anyway on the server site.

tweeted

no imports

As it's just a trial site I can provide any access at all but obviously I can also just wait!

Cheers,

Val

@valuser

went back to wordpress cron.

Tweeted

bebop log reports Importer service started. Importer service completed. Imported 0 Tweets.

no imports though

@DaleMckeown
LNCD Group member

Hi,

No pressure at all! glad you got the API/consumer key combination sorted.

The twitter name will remain empty until the importer has ran. This is because the twitter username is retrieved when the first import has taken place.

In the user settings (where a user is authenticated), there is also an option to turn importing on/off. Make sure this is on, otherwise the importer will skip the user and not import anything.

As its a trial site, do you mind giving me some access so i can make sure the settings etc are all ok?

Dale

@DaleMckeown
LNCD Group member

Also, content will not appear in the activity stream instantly. Once a stream has been added, you need to go to the "OER Manager" tab, click on the "unverified" button, and then approve the content. It should then appear in the activity stream.

Also, the type of cron you use will does not make a difference to how content is imported - they both use the same import scripts.

Dale

@valuser
@DaleMckeown
LNCD Group member

That username/password combination is not valid.

Dale

@valuser
@alexbilbie
@DaleMckeown
LNCD Group member

I was just email valuser now ;)

Dale

@DaleMckeown
LNCD Group member

valuser please see your emails.

Dale

@DaleMckeown
LNCD Group member

Bug found. Maths fail causing unexpected false return of a function. WIll fix and update on wordpress.org tomorrow.

@valuser
@valuser

Came back to this just now. Just to confirm and thanks. Tweets coming in and when verified go to activity. This really has huge potential don't you think. There is a kinda similar premium plugin but at the moment the developer appears to be hugely busy.

You have cron set at 10 ?? is there a reason ? Something like every hour probably more suitable .

MultiNetwork - will post new issue next week

I have very little (none) knowledge of crons. But say you had hundreds of networks (e.g. network1.mydomain.com, network2.mydomain.com, etc,etc) in a multi-network setup then, with the current set-up ,you would have to have a separate cron for each network. Would it be possible to merge all these crons into one for the entire installation ??

I ask cos i'm testing a multi-network set-up -----> again not urgent but very interested

@DaleMckeown
LNCD Group member

Hi valuser,

I only changed the cron time so I didn't have to wait for it to refresh. You can go ahead and change it as you wish. Default was 300 seconds (5 minutes).

Also - I am just about to publish version 1.0.1 which should fix a few bugs I have found.

All crons do is request a page to be called by the server every X amount of time. The WordPress cron technically isn't a proper cron service, because someone has to trigger the execution of the script (i.e. even if the cron is set to run every 5 minutes but no-one visits the site for 24 hours, the cron will only be ran when the page is accessed, so once in 24 hours).

A normal server cron requests the page every X amount of time regardless of whether someone is accessing the site. This means that a server cron every 5 minutes will run the import scripts every 5 minutes regardless of whether the site is accessed by someone or not. (therefore always actively importing data)

See the difference in cron as a triggering mechanism. The WordPress cron requires someone to access the page to trigger the mechanism, while a server cron triggers automatically.

Regarding the multi-network - I have never used it before so I do not know how it is built or how they operate. However, I am sure it is entirely possible, but I won't be the one to find out! At a guess you would have to aggregate all the import script URL's together and then execute them on at a time. You would probably run into cross-domain issues at some point depending on how you try to accomplish this.

On a side note, most web hosts do not restrict the amount of server crons you can use, so this would probably be an easier option than trying to wrap the import scripts in another file.

Dale

@valuser

Bril.

I'm pushing the boat out here ! Bear with me if you can !

"most web hosts do not restrict the amount of server crons you can use" - i did not know that (i had presumed otherwise) so that should not be the problem I thought it was going to be.

"You would probably run into cross-domain issues" ------- it could be a huge problem

However In my own amateur way i have thought a little about that as currently in a buddypress multinetwork each user is a member of every network though they have separate xprofile fields for each network .

I thought I would limit each user to one OER i.e. that on their "home" network so that the OER tab would only appear in their "home" network profile and not on their profile in any other network.

If I made function bebop_setup_user_nav() { in bebop-pages.php) conditional on it being the current users "home" network would that prevent the OER tab from appearing on the users profile pages in other networks or would I have to alter somewhere else as well ?

@DaleMckeown
LNCD Group member

Hi valuser,

Like I said I am not sure how multi-networks work in regards to sharing resources in terms of sharing database or even plugin installs, so I do not know how that might work out for you.

Theoretically - if they share plugin resources you should be able to wrap the contents of the bebop_setup_user_nav() function in a conditional statement which checks the site URL against your 'home' site url.

Im gonna close this thread as it appears the issue is fixed. If you have any more qustions regarding the multinetwork stuff then please email me.

Dale

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